scheduleFeedUpdate behaviour changed (force when Update clicked, use MIN_UPDATE_TIME on startup
This commit is contained in:
parent
11c2f3fae5
commit
cb2461767d
|
@ -103,7 +103,7 @@
|
||||||
|
|
||||||
print "<p align=\"center\">All feeds:
|
print "<p align=\"center\">All feeds:
|
||||||
<a class=\"button\"
|
<a class=\"button\"
|
||||||
href=\"javascript:scheduleFeedUpdate()\">Update</a>";
|
href=\"javascript:scheduleFeedUpdate(true)\">Update</a>";
|
||||||
|
|
||||||
print " <a class=\"button\"
|
print " <a class=\"button\"
|
||||||
href=\"javascript:catchupAllFeeds()\">Mark as read</a></p>";
|
href=\"javascript:catchupAllFeeds()\">Mark as read</a></p>";
|
||||||
|
|
18
tt-rss.js
18
tt-rss.js
|
@ -54,7 +54,7 @@ function feedlist_callback() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (first_run) {
|
if (first_run) {
|
||||||
scheduleFeedUpdate();
|
scheduleFeedUpdate(false);
|
||||||
first_run = false;
|
first_run = false;
|
||||||
} else {
|
} else {
|
||||||
notify("");
|
notify("");
|
||||||
|
@ -103,17 +103,21 @@ function view_callback() {
|
||||||
|
|
||||||
function refetch_callback() {
|
function refetch_callback() {
|
||||||
if (xmlhttp_rpc.readyState == 4) {
|
if (xmlhttp_rpc.readyState == 4) {
|
||||||
// feeds are updated in background
|
updateFeedList(true, false);
|
||||||
updateFeedList(false, false);
|
|
||||||
// notify("All feeds updated");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function scheduleFeedUpdate() {
|
function scheduleFeedUpdate(force) {
|
||||||
|
|
||||||
notify("Updating feeds in background...");
|
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) {
|
if (xmlhttp_rpc.readyState == 4 || xmlhttp_rpc.readyState == 0) {
|
||||||
xmlhttp_rpc.open("GET", query_str, true);
|
xmlhttp_rpc.open("GET", query_str, true);
|
||||||
|
@ -259,7 +263,7 @@ function view(id,feed_id) {
|
||||||
|
|
||||||
function timeout() {
|
function timeout() {
|
||||||
|
|
||||||
scheduleFeedUpdate();
|
scheduleFeedUpdate(true);
|
||||||
|
|
||||||
setTimeout("timeout()", 1800*1000);
|
setTimeout("timeout()", 1800*1000);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue