]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix _force_scheduled_update handling
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 11 Nov 2010 08:36:56 +0000 (11:36 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 11 Nov 2010 08:37:10 +0000 (11:37 +0300)
tt-rss.js
viewfeed.js

index 44c0b608e3039de921e270a64843ba16b07a91e7..841d4b337642368f4c19c2b29a32548c5f75046b 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -163,6 +163,8 @@ function timeout() {
 
                if (ts - last_scheduled_update > 10 || _force_scheduled_update) {
 
+                       //console.log("timeout()");
+
                        window.clearTimeout(counter_timeout_id);
                
                        var query_str = "?op=rpc&subop=getAllCounters";
@@ -181,7 +183,9 @@ function timeout() {
                        }
                        
                        query_str = query_str + "&omode=" + omode;
-                       query_str = query_str + "&last_article_id=" + getInitParam("last_article_id");
+
+                       if (!_force_scheduled_update)
+                               query_str = query_str + "&last_article_id=" + getInitParam("last_article_id");
                
                        //console.log("[timeout]" + query_str);
                
@@ -192,6 +196,7 @@ function timeout() {
                                        } });
 
                        last_scheduled_update = ts;
+                       _force_scheduled_update = false;
                }
 
        } catch (e) {
index f46b97863dfd4fb130e1201602b631fae10875c8..4dacb2003f6aa49534bc99df52704e3143a9f58d 100644 (file)
@@ -323,6 +323,9 @@ function showArticleInHeadlines(id) {
 
                markHeadline(id);
 
+               if (article_is_unread)
+                       _force_scheduled_update = true;
+
        } catch (e) {
                exception_error("showArticleInHeadlines", e);
        }