summaryrefslogtreecommitdiff
path: root/www/js/PortalLoginCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-10-17 16:44:29 -0400
committerPliable Pixels <pliablepixels@gmail.com>2018-10-17 16:44:29 -0400
commite7c927d71902e132b3f43bc0de9d3a723f1e7a0b (patch)
treedac70be68eed82ea77c35dfb27f6253c1e7b71fa /www/js/PortalLoginCtrl.js
parent3ce67b7a46785b15e31afb9c77af4524e3e576d4 (diff)
don't call push notification handler till auth is done
Diffstat (limited to 'www/js/PortalLoginCtrl.js')
-rw-r--r--www/js/PortalLoginCtrl.js19
1 files changed, 9 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();