]> git.wh0rd.org - tt-rss.git/commitdiff
do not try to update offline data when in offline mode
authorAndrew Dolgov <fox@bah.org.ru>
Wed, 4 Feb 2009 14:45:58 +0000 (17:45 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 4 Feb 2009 14:45:58 +0000 (17:45 +0300)
offline.js
tt-rss.js

index 53a005b83753f16da962bfdf2b1f2e035dbfacaa..620988c8987bf90caa8c41272d802344e52a0867 100644 (file)
@@ -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();
index c4f9542c26f0adf7c04bbf6aee34e69d9ca15613..5d104a06980c0da1b5ead867b12a77e3e57b7c14 100644 (file)
--- 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);
        }