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

workaround for a race condition between dojo.parse() and tt-rss loading proper day/night css on startup because of firefox async CSS loader

This commit is contained in:
Andrew Dolgov
2019-12-15 11:57:26 +03:00
parent 0d6add5d7f
commit 07f4878d59
5 changed files with 92 additions and 52 deletions

View File

@@ -63,19 +63,21 @@ require(["dojo/_base/kernel",
try {
const _App = declare("fox.App", AppBase, {
constructor: function() {
parser.parse();
this.setupNightModeDetection(() => {
parser.parse();
this.setLoadingProgress(50);
this.setLoadingProgress(50);
const clientTzOffset = new Date().getTimezoneOffset() * 60;
const params = {op: "rpc", method: "sanityCheck", clientTzOffset: clientTzOffset};
const clientTzOffset = new Date().getTimezoneOffset() * 60;
const params = {op: "rpc", method: "sanityCheck", clientTzOffset: clientTzOffset};
xhrPost("backend.php", params, (transport) => {
try {
this.backendSanityCallback(transport);
} catch (e) {
this.Error.report(e);
}
xhrPost("backend.php", params, (transport) => {
try {
this.backendSanityCallback(transport);
} catch (e) {
this.Error.report(e);
}
});
});
},
initSecondStage: function() {