diff options
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/MontageCtrl.js | 15 | ||||
| -rw-r--r-- | www/js/NVR.js | 1 |
2 files changed, 13 insertions, 3 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 8708970d..a906ec50 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -54,7 +54,13 @@ angular.module('zmApp.controllers') var broadcastHandles = []; - + $scope.$on("monitors-hard-reload", function () { + + NVR.debug ("Monitors reloaded, reloading monitor array"); + $scope.MontageMonitors = angular.copy($scope.monitors); + + + }); var as = $scope.$on("auth-success", function () { @@ -1705,7 +1711,8 @@ angular.module('zmApp.controllers') } function onResume() { - + NVR.debug ("resume called, hard refreshing monitor lists just to make sure..."); + NVR.getMonitors(1); // we should be going to portal login so no need here //NVR.debug ("Montage resume called, regenerating all connkeys"); //NVR.regenConnKeys(); @@ -2602,7 +2609,7 @@ angular.module('zmApp.controllers') NVR.debug("MontageCtrl: Android detected, using cordova-multiwindow plugin for onStop/onStart instead"); window.MultiWindowPlugin.registerOnStop("montage-pause", onPause); } - // document.addEventListener("resume", onResume, false); + document.addEventListener("resume", onResume, false); }); @@ -2641,6 +2648,8 @@ angular.module('zmApp.controllers') }; $scope.$on('$ionicView.beforeLeave', function () { + document.removeEventListener("resume", onResume, false); + // window.removeEventListener("resize", jiggleMontage, false); currentStreamState = streamState.STOPPED; viewCleanup(); diff --git a/www/js/NVR.js b/www/js/NVR.js index ec66b438..ff438892 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -3320,6 +3320,7 @@ angular.module('zmApp.controllers') }); }); + $rootScope.$broadcast('monitors-hard-reload'); return d.promise; } else // monitors are loaded |
