]> git.wh0rd.org - tt-rss.git/commitdiff
viewfeed: update local db on catchup
authorAndrew Dolgov <fox@bah.org.ru>
Sat, 7 Feb 2009 08:16:45 +0000 (11:16 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Sat, 7 Feb 2009 08:16:45 +0000 (11:16 +0300)
feedlist.js
offline.js

index 740ecdbc0679aa2544dfdfa7157170bc0bdef8c0..03490061947973129ad63e98c002b63dfef6a4ea 100644 (file)
@@ -186,6 +186,8 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) {
 
                if (subop == "MarkAllRead") {
 
+                       catchup_local_feed(feed, is_cat);
+
                        var show_next_feed = getInitParam("on_catchup_show_next_feed") == "1";
 
                        if (show_next_feed) {
index be28b43d11c2fc80f4f43bc1e378eebd08260c5b..7910bba818fe91aba7dd61fd721b6ddcb210482d 100644 (file)
@@ -1272,6 +1272,8 @@ function update_local_sync_data() {
 
 function catchup_local_feed(id, is_cat) {
        try {
+               if (!db) return;
+
                if (!is_cat) {
                        if (id >= 0) {
                                db.execute("UPDATE articles SET unread = 0 WHERE feed_id = ?", [id]);