mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 12:55:56 +00:00
offline: try to keep local server info ready for offline mode
This commit is contained in:
25
tt-rss.js
25
tt-rss.js
@@ -132,8 +132,14 @@ function backend_sanity_check_callback(transport) {
|
||||
}
|
||||
|
||||
if (!transport.responseXML) {
|
||||
fatalError(3, "Sanity check: Received reply is not XML", transport.responseText);
|
||||
return;
|
||||
if (!store) {
|
||||
fatalError(3, "Sanity check: Received reply is not XML",
|
||||
transport.responseText);
|
||||
return;
|
||||
} else {
|
||||
init_offline();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var reply = transport.responseXML.firstChild.firstChild;
|
||||
@@ -397,17 +403,10 @@ function init() {
|
||||
|
||||
loading_set_progress(30);
|
||||
|
||||
offline_mode = false;
|
||||
if (store) offline_mode = store.currentVersion;
|
||||
|
||||
if (offline_mode) {
|
||||
init_offline();
|
||||
} else {
|
||||
new Ajax.Request("backend.php?op=rpc&subop=sanityCheck" + params, {
|
||||
onComplete: function(transport) {
|
||||
backend_sanity_check_callback(transport);
|
||||
} });
|
||||
}
|
||||
new Ajax.Request("backend.php?op=rpc&subop=sanityCheck" + params, {
|
||||
onComplete: function(transport) {
|
||||
backend_sanity_check_callback(transport);
|
||||
} });
|
||||
|
||||
} catch (e) {
|
||||
exception_error("init", e);
|
||||
|
||||
Reference in New Issue
Block a user