From 8a537d2da05897a96154fe9da6b3db761072108a Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Tue, 9 Jan 2018 14:02:41 -0500 Subject: #499 - handle proper push handling for when app is exited or alive (iOS testing is TBD) --- www/js/PortalLoginCtrl.js | 97 ++--------------------------------------------- 1 file changed, 3 insertions(+), 94 deletions(-) (limited to 'www/js/PortalLoginCtrl.js') diff --git a/www/js/PortalLoginCtrl.js b/www/js/PortalLoginCtrl.js index a7d25f84..838d107e 100644 --- a/www/js/PortalLoginCtrl.js +++ b/www/js/PortalLoginCtrl.js @@ -267,98 +267,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic return (d.promise); } - function evaluateTappedNotification() - { - var ld = NVRDataModel.getLogin(); - - - if ($rootScope.tappedNotification == 2) { // url launch - NVRDataModel.debug("Came via app url launch with mid="+$rootScope.tappedMid); - NVRDataModel.debug("Came via app url launch with eid="+$rootScope.tappedEid); - $rootScope.tappedNotification = 0; - $ionicHistory.nextViewOptions( - { - disableBack: true - }); - - if (parseInt($rootScope.tappedMid) > 0) - { - NVRDataModel.debug("Going to live view "); - $state.go("app.monitors", - {}, - { - reload: true - }); - return; - - } - - else if (parseInt($rootScope.tappedEid) > 0) { - NVRDataModel.debug("Going to events with EID=" + $rootScope.tappedEid); - $state.go("app.events", - { - //"id": $rootScope.tappedEid, - "id": 0, - "playEvent": true - }, - { - reload: true - }); - return; - } - // go with monitor first, then event - just because I feel like ;) - - - } - else if ($rootScope.tappedNotification == 1) // push - { - - - NVRDataModel.log("Came via push tap. onTapScreen=" + ld.onTapScreen); - //console.log ("***** NOTIFICATION TAPPED "); - $rootScope.tappedNotification = 0; - $ionicHistory.nextViewOptions( - { - disableBack: true - }); - - if (ld.onTapScreen == $translate.instant('kTapMontage')) - { - NVRDataModel.debug("Going to montage"); - $state.go("app.montage", - {}, - { - reload: true - }); - - return; - } - else if (ld.onTapScreen == $translate.instant('kTapEvents')) - { - NVRDataModel.debug("Going to events"); - $state.go("app.events", - { - "id": 0, - "playEvent": false - }, - { - reload: true - }); - return; - } - else // we go to live - { - NVRDataModel.debug("Going to live view "); - $state.go("app.monitors", - {}, - { - reload: true - }); - return; - } - } - - } + function unlock(idVerified) { @@ -442,8 +351,8 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic return; } - else - evaluateTappedNotification(); + //else + // evaluateTappedNotification(); }, -- cgit v1.2.3