From 823ff6aa2e6c38ee45c114cfb5b064cc52e9b972 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 4 Feb 2009 17:45:58 +0300 Subject: [PATCH] do not try to update offline data when in offline mode --- offline.js | 6 ++---- tt-rss.js | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/offline.js b/offline.js index 53a005b8..620988c8 100644 --- a/offline.js +++ b/offline.js @@ -551,10 +551,11 @@ function update_offline_data(stage) { try { if (!stage) stage = 0; + if (offline_mode) return; debug("update_offline_data: stage " + stage); -// notify_progress("Loading, please wait... (" + stage +")", true); + notify_progress("Updating offline data... (" + stage +")", true); var query = "backend.php?op=rpc&subop=download&stage=" + stage; @@ -727,9 +728,6 @@ function init_gears() { db.execute("DELETE FROM cache WHERE id LIKE 'F:%' OR id LIKE 'C:%'"); - - window.setTimeout("update_offline_data(0)", 100); - } cache_expire(); diff --git a/tt-rss.js b/tt-rss.js index c4f9542c..5d104a06 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -553,6 +553,8 @@ function init_second_stage() { resize_headlines(); + window.setTimeout("update_offline_data(0)", 100); + } catch (e) { exception_error("init_second_stage", e); } -- 2.39.5