mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 10:45:55 +00:00
code cleanups, make feedlist_callback async
This commit is contained in:
37
tt-rss.js
37
tt-rss.js
@@ -219,14 +219,10 @@ function updateFeedList(silent, fetch) {
|
||||
|
||||
debug("updateFeedList Q=" + query_str);
|
||||
|
||||
if (xmlhttp_ready(xmlhttp)) {
|
||||
xmlhttp.open("GET", query_str, true);
|
||||
xmlhttp.onreadystatechange=feedlist_callback;
|
||||
xmlhttp.send(null);
|
||||
} else {
|
||||
debug("xmlhttp busy");
|
||||
//printLockingError();
|
||||
}
|
||||
new Ajax.Request(query_str, {
|
||||
onComplete: function(transport) {
|
||||
feedlist_callback2(transport);
|
||||
} });
|
||||
|
||||
}
|
||||
|
||||
@@ -238,14 +234,10 @@ function catchupAllFeeds() {
|
||||
|
||||
debug("catchupAllFeeds Q=" + query_str);
|
||||
|
||||
if (xmlhttp_ready(xmlhttp)) {
|
||||
xmlhttp.open("GET", query_str, true);
|
||||
xmlhttp.onreadystatechange=feedlist_callback;
|
||||
xmlhttp.send(null);
|
||||
} else {
|
||||
debug("xmlhttp busy");
|
||||
//printLockingError();
|
||||
}
|
||||
new Ajax.Request(query_str, {
|
||||
onComplete: function(transport) {
|
||||
feedlist_callback2(transport);
|
||||
} });
|
||||
|
||||
global_unread = 0;
|
||||
updateTitle("");
|
||||
@@ -297,19 +289,6 @@ function search() {
|
||||
viewCurrentFeed(0, "");
|
||||
}
|
||||
|
||||
function localPiggieFunction(enable) {
|
||||
if (enable) {
|
||||
var query_str = "backend.php?op=feeds&subop=piggie";
|
||||
|
||||
if (xmlhttp_ready(xmlhttp)) {
|
||||
|
||||
xmlhttp.open("GET", query_str, true);
|
||||
xmlhttp.onreadystatechange=feedlist_callback;
|
||||
xmlhttp.send(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if argument is undefined, current subtitle is not updated
|
||||
// use blank string to clear subtitle
|
||||
function updateTitle(s) {
|
||||
|
||||
Reference in New Issue
Block a user