summaryrefslogtreecommitdiff
path: root/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-08-23 07:30:20 +0100
committerAndrew Dolgov <[email protected]>2005-08-23 07:30:20 +0100
commitcb2461767d328b872b5b97f8133bcb0fc0284043 (patch)
tree67c1f02a2b546985bbfdd37156dd6dc8d79cde00 /tt-rss.js
parent11c2f3fae5a492c5bbf7d93f62cee057f3aeb6aa (diff)
scheduleFeedUpdate behaviour changed (force when Update clicked, use MIN_UPDATE_TIME on startup
Diffstat (limited to 'tt-rss.js')
-rw-r--r--tt-rss.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/tt-rss.js b/tt-rss.js
index 392ec70d8..e3f1fc906 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -54,7 +54,7 @@ function feedlist_callback() {
}
if (first_run) {
- scheduleFeedUpdate();
+ scheduleFeedUpdate(false);
first_run = false;
} else {
notify("");
@@ -103,17 +103,21 @@ function view_callback() {
function refetch_callback() {
if (xmlhttp_rpc.readyState == 4) {
- // feeds are updated in background
- updateFeedList(false, false);
-// notify("All feeds updated");
+ updateFeedList(true, false);
}
}
-function scheduleFeedUpdate() {
+function scheduleFeedUpdate(force) {
notify("Updating feeds in background...");
- var query_str = "backend.php?op=rpc&subop=forceUpdateAllFeeds";
+ var query_str = "backend.php?op=rpc&subop=";
+
+ if (force) {
+ query_str = query_str = "forceUpdateAllFeeds";
+ } else {
+ query_str = query_str = "updateAllFeeds";
+ }
if (xmlhttp_rpc.readyState == 4 || xmlhttp_rpc.readyState == 0) {
xmlhttp_rpc.open("GET", query_str, true);
@@ -259,7 +263,7 @@ function view(id,feed_id) {
function timeout() {
- scheduleFeedUpdate();
+ scheduleFeedUpdate(true);
setTimeout("timeout()", 1800*1000);