From e7c927d71902e132b3f43bc0de9d3a723f1e7a0b Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Wed, 17 Oct 2018 16:44:29 -0400 Subject: don't call push notification handler till auth is done --- www/js/PortalLoginCtrl.js | 19 +++++++++---------- www/templates/monitors-modal.html | 2 ++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/www/js/PortalLoginCtrl.js b/www/js/PortalLoginCtrl.js index 74ba806d..36630a73 100644 --- a/www/js/PortalLoginCtrl.js +++ b/www/js/PortalLoginCtrl.js @@ -272,9 +272,10 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic //this needs to be rootScope so it lives even when we are out of view var pp = $rootScope.$on("process-push", function () { - NVRDataModel.debug("*** PROCESS PUSH HANDLER CALLED INSIDE PORTAL LOGIN, setting ProcessPush to true"); processPush = true; - evaluateTappedNotification(); + NVRDataModel.debug("processPush set to true, but will act after login is complete..."); + + }); @@ -283,13 +284,6 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic function evaluateTappedNotification() { var ld = NVRDataModel.getLogin(); - // give enough time for state conflicts to work out - // that way PortalLogin doesn't override this - // and I thought I was eliminating hacks.... - $timeout(function () { - processPush = false; - }, 1000); - if ($rootScope.tappedNotification == 2) { // url launch NVRDataModel.debug("Came via app url launch with mid=" + $rootScope.tappedMid); @@ -442,7 +436,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic NVRDataModel.zmPrivacyProcessed() .then(function (val) { - console.log(">>>>>>>>>>>>>>>>>>> PRIVACY PROCEESSED:" + val); + // console.log(">>>>>>>>>>>>>>>>>>> PRIVACY PROCESSED:" + val); if (!val) { var alertPopup = $ionicPopup.alert({ title: $translate.instant('kNote'), @@ -471,6 +465,11 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic return; } + else { + NVRDataModel.debug ("Authentication over, now processing push..."); + evaluateTappedNotification(); + processPush = false; + } // else // evaluateTappedNotification(); diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html index f039780a..a83db944 100644 --- a/www/templates/monitors-modal.html +++ b/www/templates/monitors-modal.html @@ -7,6 +7,8 @@ zooming="true" direction="xy" style="width: 100%;" overflow-scroll="false"> + + {{constructSingleStream()}}
-- cgit v1.2.3