summaryrefslogtreecommitdiff
path: root/www/js/NewsCtrl.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/NewsCtrl.js')
-rw-r--r--www/js/NewsCtrl.js27
1 files changed, 17 insertions, 10 deletions
diff --git a/www/js/NewsCtrl.js b/www/js/NewsCtrl.js
index d9850080..180f70d7 100644
--- a/www/js/NewsCtrl.js
+++ b/www/js/NewsCtrl.js
@@ -27,16 +27,7 @@ angular.module('zmApp.controllers').controller('zmApp.NewsCtrl', ['$scope', '$ro
}
};
- $scope.$on ( "process-push", function () {
- NVRDataModel.debug (">> NewsCtrl: push handler");
- var s = NVRDataModel.evaluateTappedNotification();
- NVRDataModel.debug("tapped Notification evaluation:"+ JSON.stringify(s));
- $ionicHistory.nextViewOptions({
- disableAnimate:true,
- disableBack: true
- });
- $state.go(s[0],s[1],s[2]);
- });
+
//-------------------------------------------------------------------------
// Lets make sure we set screen dim properly as we enter
@@ -45,6 +36,22 @@ angular.module('zmApp.controllers').controller('zmApp.NewsCtrl', ['$scope', '$ro
// reset power state on exit as if it is called after we enter another
// state, that effectively overwrites current view power management needs
//------------------------------------------------------------------------
+
+
+ $scope.$on ('$ionicView.beforeEnter', function () {
+
+ $scope.$on ( "process-push", function () {
+ NVRDataModel.debug (">> NewsCtrl: push handler");
+ var s = NVRDataModel.evaluateTappedNotification();
+ NVRDataModel.debug("tapped Notification evaluation:"+ JSON.stringify(s));
+ $ionicHistory.nextViewOptions({
+ disableAnimate:true,
+ disableBack: true
+ });
+ $state.go(s[0],s[1],s[2]);
+ });
+ });
+
$scope.$on('$ionicView.enter', function () {
// console.log("**VIEW ** News Ctrl Entered");
NVRDataModel.setAwake(false);