1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 02:35:54 +00:00

move Utils to AppBase where it belongs

This commit is contained in:
Andrew Dolgov
2018-12-02 22:08:18 +03:00
parent ac8361e6f6
commit 5ead558e43
9 changed files with 370 additions and 381 deletions

View File

@@ -129,13 +129,13 @@ define(["dojo/_base/declare"], function (declare) {
this.counters_last_request = timestamp;
let query = {op: "rpc", method: "getAllCounters", seq: Utils.next_seq()};
let query = {op: "rpc", method: "getAllCounters", seq: App.next_seq()};
if (!force)
query.last_article_id = App.getInitParam("last_article_id");
xhrPost("backend.php", query, (transport) => {
Utils.handleRpcJson(transport);
App.handleRpcJson(transport);
});
} else {
@@ -196,7 +196,7 @@ define(["dojo/_base/declare"], function (declare) {
try {
Feeds.init();
Utils.setLoadingProgress(25);
App.setLoadingProgress(25);
} catch (e) {
exception_error(e);
}
@@ -210,7 +210,7 @@ define(["dojo/_base/declare"], function (declare) {
init: function() {
console.log("in feedlist init");
Utils.setLoadingProgress(50);
App.setLoadingProgress(50);
document.onkeydown = (event) => { App.hotkeyHandler(event) };
window.setInterval(() => { Headlines.catchupBatched() }, 10 * 1000);
@@ -461,7 +461,7 @@ define(["dojo/_base/declare"], function (declare) {
Notify.progress("Loading, please wait...", true);
xhrPost("backend.php", catchup_query, (transport) => {
Utils.handleRpcJson(transport);
App.handleRpcJson(transport);
const show_next_feed = App.getInitParam("on_catchup_show_next_feed") == "1";
@@ -520,7 +520,7 @@ define(["dojo/_base/declare"], function (declare) {
Notify.progress("Loading, please wait...", true);
xhrPost("backend.php", {op: "rpc", method: "catchupFeed", feed_id: id, is_cat: false}, (transport) => {
Utils.handleRpcJson(transport);
App.handleRpcJson(transport);
});
}
},
@@ -633,7 +633,7 @@ define(["dojo/_base/declare"], function (declare) {
console.log("in update_random_feed");
xhrPost("backend.php", {op: "rpc", method: "updateRandom"}, (transport) => {
Utils.handleRpcJson(transport, true);
App.handleRpcJson(transport, true);
});
},
});