From 752c5b6ff87f4c3ccab1e287a735af882330f7b6 Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" Date: Fri, 18 Sep 2020 15:01:57 -0500 Subject: [PATCH 1/2] Removed polymorphic trackAll usage --- src/js/controllers/remindersInboxCtrl.js | 5 +---- .../items/notification-value-input-buttons.html | 10 +++++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/js/controllers/remindersInboxCtrl.js b/src/js/controllers/remindersInboxCtrl.js index e19ac22b92..945666b1cc 100644 --- a/src/js/controllers/remindersInboxCtrl.js +++ b/src/js/controllers/remindersInboxCtrl.js @@ -278,11 +278,8 @@ angular.module('starter').controller('RemindersInboxCtrl', ["$scope", "$state", refreshIfRunningOutOfNotifications(); return n; }; - $scope.track = function(n, value, $ev, trackAll){ // Keep trackAll param because it's used in templates/items/notification-item.html + $scope.track = function(n, value, $ev){ // Keep trackAll param because it's used in templates/items/notification-item.html if(isGhostClick($ev)){return false;} - if(trackAll){ - return $scope.trackAll(n, value, $ev); - } n.action = 'track'; n.modifiedValue = value; var valueUnit = qm.stringHelper.formatValueUnitDisplayText(n.modifiedValue + ' ' + n.unitAbbreviatedName); diff --git a/src/templates/items/notification-value-input-buttons.html b/src/templates/items/notification-value-input-buttons.html index 8a142d9cc5..e2ef88f9a9 100644 --- a/src/templates/items/notification-value-input-buttons.html +++ b/src/templates/items/notification-value-input-buttons.html @@ -11,7 +11,7 @@ @@ -23,7 +23,7 @@ @@ -35,7 +35,7 @@ @@ -48,13 +48,13 @@ From fe1470a106a7a84e3692d9955ea5099f99612f67 Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" Date: Fri, 18 Sep 2020 15:08:35 -0500 Subject: [PATCH 2/2] qm.notifications.post() inb RemindersInboxCtrl beforeLeave --- src/js/controllers/remindersInboxCtrl.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/js/controllers/remindersInboxCtrl.js b/src/js/controllers/remindersInboxCtrl.js index e19ac22b92..51cbad08db 100644 --- a/src/js/controllers/remindersInboxCtrl.js +++ b/src/js/controllers/remindersInboxCtrl.js @@ -75,6 +75,15 @@ angular.module('starter').controller('RemindersInboxCtrl', ["$scope", "$state", } autoRefresh(); }); + $scope.$on('$ionicView.beforeLeave', function(){ + qmLog.debug('RemindersInboxCtrl beforeLeave'); + qm.notifications.post(); + }); + $scope.$on('$ionicView.afterLeave', function(){ + qmLog.debug('RemindersInboxCtrl afterLeave'); + $rootScope.hideHomeButton = false; + $rootScope.hideBackButton = false; + }); function readHelpCards(helpCard){ if(!qm.speech.getSpeechEnabled()){ return; @@ -101,11 +110,7 @@ angular.module('starter').controller('RemindersInboxCtrl', ["$scope", "$state", } }, 30 * 60 * 1000); } - $scope.$on('$ionicView.afterLeave', function(){ - qmLog.debug('RemindersInboxCtrl afterLeave', null); - $rootScope.hideHomeButton = false; - $rootScope.hideBackButton = false; - }); + var setPageTitle = function(){ if(getVariableCategoryName() === 'Treatments'){ $scope.state.title = 'Overdue Meds';