From: Andrew Dolgov Date: Sat, 7 Feb 2009 08:16:45 +0000 (+0300) Subject: viewfeed: update local db on catchup X-Git-Tag: 1.3.1~57 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6161d5cc87503a750ec5c1c46008f5d55a8c1b17;p=tt-rss.git viewfeed: update local db on catchup --- diff --git a/feedlist.js b/feedlist.js index 740ecdbc..03490061 100644 --- a/feedlist.js +++ b/feedlist.js @@ -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) { diff --git a/offline.js b/offline.js index be28b43d..7910bba8 100644 --- a/offline.js +++ b/offline.js @@ -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]);