From ff613f8e6210d2c4cd2f8deacc0096e18aff2fcd Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 22 Oct 2018 11:50:53 -0400 Subject: #725 move push handlers inside beforeEnter for better consistency --- www/js/LoginCtrl.js | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'www/js/LoginCtrl.js') diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js index 0585f3c3..09a48ac2 100644 --- a/www/js/LoginCtrl.js +++ b/www/js/LoginCtrl.js @@ -33,17 +33,7 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r } - $scope.$on ( "process-push", function () { - NVRDataModel.debug (">> LoginCtrl: push handler. Not processing push, because you might be here due to login failure"); - /*var s = NVRDataModel.evaluateTappedNotification(); - NVRDataModel.debug("tapped Notification evaluation:"+ JSON.stringify(s)); - $ionicHistory.nextViewOptions({ - disableAnimate:true, - disableBack: true - }); - $state.go(s[0],s[1],s[2]);*/ - }); - + //---------------------------------------------------------------- // Alarm notification handling //---------------------------------------------------------------- @@ -244,6 +234,20 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r // state, that effectively overwrites current view power management needs //------------------------------------------------------------------------ $scope.$on('$ionicView.beforeEnter', function () { + + + $scope.$on ( "process-push", function () { + NVRDataModel.debug (">> LoginCtrl: push handler. Not processing push, because you might be here due to login failure"); + /*var s = NVRDataModel.evaluateTappedNotification(); + NVRDataModel.debug("tapped Notification evaluation:"+ JSON.stringify(s)); + $ionicHistory.nextViewOptions({ + disableAnimate:true, + disableBack: true + }); + $state.go(s[0],s[1],s[2]);*/ + }); + + oldLoginData = ''; $scope.loginData = NVRDataModel.getLogin(); -- cgit v1.2.3