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"); router.navigate("/home");

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

Loading…
Cancel
Save