diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-09-05 15:21:37 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-09-05 15:21:37 -0400 |
| commit | 875c555a61bea8f0e911b4fe412cc3f70931dc1c (patch) | |
| tree | e934bad8c3704b6b86679f77bc542590f8efb02d /www/js/app.js | |
| parent | 11e5ca9bde04285fb87b54f0612778546c6d5b85 (diff) | |
#697 initial code for cloud sync
Diffstat (limited to 'www/js/app.js')
| -rwxr-xr-x | www/js/app.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/www/js/app.js b/www/js/app.js index 9d88362d..3b907780 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -111,7 +111,8 @@ angular.module('zmApp', [ eventServerErrorDelay: 5000, // time to wait till I report initial connect errors zmVersionCheckNag: 60 * 24, // in hrs waitTimeTillResume: 5, // in sec, for ES error - versionWithLoginAPI: "1.31.45" + versionWithLoginAPI: "1.31.45", + androidBackupKey: "AEdPqrEAAAAIqF-OaHdwIzZhx2L1WOfAGTagBxm5a1R4wBW_Uw" }) @@ -1807,11 +1808,12 @@ angular.module('zmApp', [ //console.log("localforage config"); NVRDataModel.configureStorageDB() - .then(function () { + .then (function () {NVRDataModel.log ("localforage driver:"+localforage.driver()); return NVRDataModel.cloudSync(); } ) + .then(function () { // this should alert "cordovaSQLiteDriver" when in an emulator or a device - NVRDataModel.log("localforage driver for storage:" + localforage.driver()); - + // Now lets import old data if it exists: + NVRDataModel.log ("Cloudsync operation complete, continuing..."); var defaultServerName = $localstorage.get("defaultServerName"); localforage.getItem("defaultServerName") @@ -1979,7 +1981,7 @@ angular.module('zmApp', [ NVRDataModel.log("First time detected "); $state.go("app.first-use"); return; - //continueRestOfInit(); + } else { continueRestOfInit(); } @@ -2028,14 +2030,10 @@ angular.module('zmApp', [ function loadServices() { NVRDataModel.log("Language file loaded, continuing with rest"); NVRDataModel.init(); - - zmCheckUpdates.start(); NVRDataModel.log("Setting up POST LOGIN timer"); zmAutoLogin.start(); - setupPauseAndResume(); - - + setupPauseAndResume(); } |
