diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-26 16:26:00 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-26 16:26:00 -0400 |
| commit | 22f9120d544195d30ac115f4e086c6305c1c11dc (patch) | |
| tree | 3dc87ed3763c660006a9136e851b0d73e0093454 /www/js/DataModel.js | |
| parent | b7de0d2bdec5da7bbdf5ee392bf78cc09603f2a2 (diff) | |
fixed issue while doing logout
Diffstat (limited to 'www/js/DataModel.js')
| -rwxr-xr-x | www/js/DataModel.js | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index ee807100..8c2ba754 100755 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -952,14 +952,10 @@ angular.module('zmApp.controllers') if (typeof loginData.disableSimulStreaming == 'undefined') { - loginData.disableSimulStreaming = false; - + loginData.disableSimulStreaming = ($rootScope.platformOS == 'ios')?true:false; + } - // iOS it is always off, webkit bug - - if ($rootScope.platformOS=='ios') { - loginData.disableSimulStreaming = true; - } + if (typeof loginData.exitOnSleep == 'undefined') { debug("exitOnSleep does not exist. Setting to false"); @@ -1253,17 +1249,25 @@ angular.module('zmApp.controllers') }, stopNetwork: function (str) { + var d = $q.defer(); var s = ""; if (str) s = str + ":"; if (justResumed) { // we don't call stop as we did stop on pause log(s + " Not calling window stop as we just resumed"); + d.resolve (true); + return (d.promise); } else { log(s + " stopNework: Calling window.stop()"); - $timeout (function() {window.stop();}); + $timeout (function() { + window.stop(); + d.resolve(true); + return (d.promise); + }); } + return d.promise; }, hasLoginInfo: function () { @@ -2423,10 +2427,12 @@ angular.module('zmApp.controllers') }, logout: function () { + + var d = $q.defer(); log (loginData.url +"=>Logging out of any existing ZM sessions..."); $rootScope.authSession = "undefined"; - return $http( + $http( { method: 'POST', timeout:10000, @@ -2452,7 +2458,10 @@ angular.module('zmApp.controllers') action: "logout", view: "login" } - }); + }) + .then (function (succ) {d.resolve(true);return d.promise;}, + function (err) {d.resolve(true);return d.promise;}); + return d.promise; } |
