Skip to content

Commit

Permalink
Merge pull request #4046 from QuantiModo/feature/beforeLeave
Browse files Browse the repository at this point in the history
qm.notifications.post() in RemindersInboxCtrl beforeLeave
  • Loading branch information
mikepsinn authored Sep 19, 2020
2 parents 409c5f1 + 8e12822 commit 6bd3f2a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/js/controllers/remindersInboxCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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';
Expand Down

0 comments on commit 6bd3f2a

Please sign in to comment.