From e7491c6f082ae82b45722055135fa0d2a1f72653 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Wed, 12 Dec 2018 15:38:18 -0500 Subject: app state restore fix --- www/js/app.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'www/js') diff --git a/www/js/app.js b/www/js/app.js index e735557b..6e400e94 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -2083,7 +2083,9 @@ angular.module('zmApp', [ localforage.getItem('last-desktop-state') .then(function (succ) { -// console.log("FOUND STATE" + JSON.stringify(succ) + ":" + succ); + console.log("FOUND STATE" + JSON.stringify(succ) + ":" + succ); + + if (succ == null) succ = {name:"app.montage"}; // sanitize this if (!succ.name || typeof succ.name !== 'string') { @@ -2114,15 +2116,12 @@ angular.module('zmApp', [ } loadServices(); }, function (err) { - //console.log("ERR " + JSON.stringify(err)); + + console.log("ERR " + JSON.stringify(err)); + $rootScope.lastState = "app.montage"; loadServices(); }); - } else - - { - - loadServices(); - } + } function loadServices() { NVRDataModel.log("Language file loaded, continuing with rest"); -- cgit v1.2.3