From aa29550a71443e3d3272aee87ea6b778f3a372ea Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sun, 22 Apr 2018 15:25:25 -0400 Subject: tiny bits here and there --- www/js/PortalLoginCtrl.js | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) (limited to 'www/js/PortalLoginCtrl.js') diff --git a/www/js/PortalLoginCtrl.js b/www/js/PortalLoginCtrl.js index f7ade984..bdc3fffe 100644 --- a/www/js/PortalLoginCtrl.js +++ b/www/js/PortalLoginCtrl.js @@ -236,11 +236,19 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic if (NVRDataModel.versionCompare(data, zm.recommendedAppVersion) == -1 && data != "0.0.0") { - $state.go('app.importantmessage', - { - "ver": data + NVRDataModel.hrsSinceChecked("zmVersion") + .then (function (val) { + if (val >=24) { + NVRDataModel.updateHrsSinceChecked("zmVersion"); + $state.go('app.importantmessage', + { + "ver": data + }); + return; + } + }); - return; + } /*if (data == "0.0.0") @@ -449,16 +457,23 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic if (NVRDataModel.versionCompare(data, zm.recommendedAppVersion) == -1 && data != "0.0.0") { + + NVRDataModel.hrsSinceChecked("zmVersion") + .then (function (val) { + if (val >=24) { + NVRDataModel.updateHrsSinceChecked("zmVersion"); + $state.go('app.importantmessage', + { + "ver": data + }); + return; - // console.log (">>>>>>>>>>>>> HERE AND VERSION SAYS " +NVRDataModel.versionCompare(data, zm.recommendedAppVersion)); - //console.log ("GOING TO IMPORTANT"); - $state.go('app.importantmessage', - { - "ver": data + } + }); - return; + } - + /*if (data == "0.0.0") { -- cgit v1.2.3