mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 08:35:56 +00:00
adjust rate limits on automatic update of offline info
This commit is contained in:
@@ -1019,9 +1019,7 @@ function update_feedlist_counters() {
|
|||||||
|
|
||||||
hideOrShowFeeds(getInitParam("hide_read_feeds") == 1);
|
hideOrShowFeeds(getInitParam("hide_read_feeds") == 1);
|
||||||
|
|
||||||
var unread = get_local_feed_unread(-4);
|
global_unread = get_local_feed_unread(-4);
|
||||||
|
|
||||||
global_unread = unread;
|
|
||||||
updateTitle();
|
updateTitle();
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -521,7 +521,7 @@
|
|||||||
//$unread_only = db_escape_string($_REQUEST["unread_only"]);
|
//$unread_only = db_escape_string($_REQUEST["unread_only"]);
|
||||||
//if (!$amount) $amount = 50;
|
//if (!$amount) $amount = 50;
|
||||||
|
|
||||||
$amount = 100;
|
$amount = 200;
|
||||||
$unread_only = true;
|
$unread_only = true;
|
||||||
|
|
||||||
print "<rpc-reply>";
|
print "<rpc-reply>";
|
||||||
@@ -583,7 +583,6 @@
|
|||||||
$line["unread"] = (int)sql_bool_to_bool($line["unread"]);
|
$line["unread"] = (int)sql_bool_to_bool($line["unread"]);
|
||||||
$line["tags"] = format_tags_string(get_article_tags($link, $id), $id);
|
$line["tags"] = format_tags_string(get_article_tags($link, $id), $id);
|
||||||
|
|
||||||
|
|
||||||
print json_encode($line);
|
print json_encode($line);
|
||||||
print "]]></article>";
|
print "]]></article>";
|
||||||
}
|
}
|
||||||
|
|||||||
10
tt-rss.js
10
tt-rss.js
@@ -242,6 +242,8 @@ function updateFeedList(silent, fetch) {
|
|||||||
|
|
||||||
debug("<b>updateFeedList</b>");
|
debug("<b>updateFeedList</b>");
|
||||||
|
|
||||||
|
if (offline_mode) return render_offline_feedlist();
|
||||||
|
|
||||||
var query_str = "backend.php?op=feeds";
|
var query_str = "backend.php?op=feeds";
|
||||||
|
|
||||||
if (display_tags) {
|
if (display_tags) {
|
||||||
@@ -1582,7 +1584,7 @@ function offline_download_parse(stage, transport) {
|
|||||||
[id, title, has_icon]);
|
[id, title, has_icon]);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.setTimeout("update_offline_data("+(stage+1)+")", 50);
|
window.setTimeout("update_offline_data("+(stage+1)+")", 30*1000);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
var articles = transport.responseXML.getElementsByTagName("article");
|
var articles = transport.responseXML.getElementsByTagName("article");
|
||||||
@@ -1609,10 +1611,9 @@ function offline_download_parse(stage, transport) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (articles_found > 0) {
|
if (articles_found > 0) {
|
||||||
window.setTimeout("update_offline_data("+(stage+1)+")", 50);
|
window.setTimeout("update_offline_data("+(stage+1)+")", 60*1000);
|
||||||
} else {
|
} else {
|
||||||
// notify_info("All done.");
|
window.setTimeout("update_offline_data(0)", 1800*1000);
|
||||||
// closeInfoBox();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1647,6 +1648,7 @@ function update_offline_data(stage) {
|
|||||||
new Ajax.Request(query, {
|
new Ajax.Request(query, {
|
||||||
onComplete: function(transport) {
|
onComplete: function(transport) {
|
||||||
offline_download_parse(stage, transport);
|
offline_download_parse(stage, transport);
|
||||||
|
debug("update_offline_data: done " + stage);
|
||||||
} });
|
} });
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user