auto refresh active feed when new messages are detected
This commit is contained in:
parent
d0bb308e16
commit
e8ef3b9715
|
@ -358,7 +358,7 @@ if (!xmlhttp_rpc && typeof XMLHttpRequest!='undefined') {
|
||||||
xmlhttp_rpc = new XMLHttpRequest();
|
xmlhttp_rpc = new XMLHttpRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse_counters(reply, f_document, title_obj) {
|
function parse_counters(reply, f_document, title_obj, scheduled_call) {
|
||||||
try {
|
try {
|
||||||
for (var l = 0; l < reply.childNodes.length; l++) {
|
for (var l = 0; l < reply.childNodes.length; l++) {
|
||||||
if (!reply.childNodes[l] ||
|
if (!reply.childNodes[l] ||
|
||||||
|
@ -394,6 +394,11 @@ function parse_counters(reply, f_document, title_obj) {
|
||||||
|
|
||||||
if (feedctr && feedu && feedr) {
|
if (feedctr && feedu && feedr) {
|
||||||
|
|
||||||
|
if (feedu.innerHTML != ctr && id == getActiveFeedId() && scheduled_call) {
|
||||||
|
var hf = title_obj.parent.frames["headlines-frame"];
|
||||||
|
hf.location.reload(true);
|
||||||
|
}
|
||||||
|
|
||||||
feedu.innerHTML = ctr;
|
feedu.innerHTML = ctr;
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|
|
@ -128,7 +128,7 @@ function refetch_callback() {
|
||||||
|
|
||||||
var f_document = window.frames["feeds-frame"].document;
|
var f_document = window.frames["feeds-frame"].document;
|
||||||
|
|
||||||
parse_counters(reply, f_document, window);
|
parse_counters(reply, f_document, window, true);
|
||||||
|
|
||||||
debug("refetch_callback: done");
|
debug("refetch_callback: done");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue