Fix crash if Cordova doesn't init fast enough

Skylar Ittner 2 years ago
parent b179677722
commit 94ab1d5cbb

@ -206,6 +206,4 @@ function setAnimations(enabled) {
}
}
loadSettings();
router.navigate("/home");

@ -160,6 +160,8 @@ function initCordova() {
document.addEventListener("backbutton", handleBackButton, false);
document.addEventListener("deviceready", function () {
loadSettings();
// Make sure the status bar color is set properly
applyColorTheme();
@ -239,6 +241,7 @@ function initCordova() {
}
function initNW() {
loadSettings();
platform_type = "nw";
platform_theme = "md";
openBrowser = function (url) {
@ -286,6 +289,7 @@ function initNW() {
}
function initBrowser() {
loadSettings();
platform_type = "browser";
platform_theme = "md";
openBrowser = function (url) {

Loading…
Cancel
Save