diff options
| author | pliablepixels <pliablepixels@gmail.com> | 2016-02-02 16:18:28 -0500 |
|---|---|---|
| committer | pliablepixels <pliablepixels@gmail.com> | 2016-02-02 16:18:28 -0500 |
| commit | 0f31498242a1ca0e94af7b16d197d8ff5dce5b51 (patch) | |
| tree | 3147de96ff3283ff7d99c9a3ee7c27e9099119a8 /www/js/app.js | |
| parent | b724f501d428949aea8bdded74161107d64f3a0b (diff) | |
don't think we need to restart timers on resume as it goes via portal login so its a new load.
Former-commit-id: d85cab9db84423b31d3b90eda7fc6295108f0609
Diffstat (limited to 'www/js/app.js')
| -rw-r--r-- | www/js/app.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/www/js/app.js b/www/js/app.js index f1f23c2e..ac0daa59 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -921,10 +921,7 @@ angular.module('zmApp', [ document.addEventListener("resume", function () { ZMDataModel.zmLog("App is resuming from background"); var ld = ZMDataModel.getLogin(); - if ($rootScope.apnsToken && ld.isUseEventServer == true) { - // ZMDataModel.zmDebug("sending enable push to Event Server"); - // EventServer.sendMessage('push', {type:'control', enablepush:'0'}); - } + ZMDataModel.setBackground(false); // don't animate @@ -957,6 +954,9 @@ angular.module('zmApp', [ ZMDataModel.setBackground(true); ZMDataModel.zmLog("ROOT APP:App is going into background"); + + $interval.cancel($rootScope.eventQueryInterval); + $interval.cancel($rootScope.intervalHandle); ZMDataModel.setBackground(true); ZMDataModel.zmLog("ROOT APP: Stopping network pull..."); @@ -971,10 +971,6 @@ angular.module('zmApp', [ ionic.Platform.exitApp(); } - if ($rootScope.apnsToken && ld.isUseEventServer == true) { - // ZMDataModel.zmDebug("sending enable push to Event Server"); - //EventServer.sendMessage('push', {type:'control',enablepush:'1'}); - } zmAutoLogin.stop(); |
