1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-14 08:25:54 +00:00

offline: tweak syncing

This commit is contained in:
Andrew Dolgov
2009-02-16 13:16:05 +03:00
parent c16694c848
commit 65c0779b77
2 changed files with 6 additions and 4 deletions

View File

@@ -459,8 +459,8 @@ function parse_counters(reply, scheduled_call) {
if (id == "global-unread") { if (id == "global-unread") {
if (ctr != global_unread) { if (ctr > global_unread) {
offlineDownloadStart(); offlineDownloadStart(1);
} }
global_unread = ctr; global_unread = ctr;

View File

@@ -1618,10 +1618,12 @@ function toggleOfflineModeInfo() {
} }
} }
function offlineDownloadStart() { function offlineDownloadStart(stage) {
try { try {
if (!stage) stage = 0;
if (db && !sync_in_progress && getInitParam("offline_enabled") == "1") { if (db && !sync_in_progress && getInitParam("offline_enabled") == "1") {
window.setTimeout("update_offline_data(0)", 100); window.setTimeout("update_offline_data("+stage+")", 100);
} }
} catch (e) { } catch (e) {
exception_error("offlineDownloadStart", e); exception_error("offlineDownloadStart", e);