From fe1470a106a7a84e3692d9955ea5099f99612f67 Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" Date: Fri, 18 Sep 2020 15:08:35 -0500 Subject: [PATCH] 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';