mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 06:35:55 +00:00
rework git update checking to be initiated by frontend, outside of runtime info output
This commit is contained in:
20
js/tt-rss.js
20
js/tt-rss.js
@@ -163,11 +163,31 @@ require(["dojo/_base/kernel",
|
||||
window.setInterval(() => { Feeds.updateRandom() }, 30 * 1000);
|
||||
}
|
||||
|
||||
if (App.getInitParam('check_for_updates')) {
|
||||
window.setInterval(() => {
|
||||
App.checkForUpdates();
|
||||
}, 3600 * 1000);
|
||||
}
|
||||
|
||||
console.log("second stage ok");
|
||||
|
||||
PluginHost.run(PluginHost.HOOK_INIT_COMPLETE, null);
|
||||
|
||||
},
|
||||
checkForUpdates: function() {
|
||||
console.log('checking for updates...');
|
||||
|
||||
xhrJson("backend.php", {op: 'rpc', method: 'checkforupdates'})
|
||||
.then((reply) => {
|
||||
console.log('update reply', reply);
|
||||
|
||||
if (reply.id) {
|
||||
$("updates-available").show();
|
||||
} else {
|
||||
$("updates-available").hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
updateTitle: function() {
|
||||
let tmp = "Tiny Tiny RSS";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user