summaryrefslogtreecommitdiff
path: root/www/js/StateCtrl.js
diff options
context:
space:
mode:
authorPliablePixels <pliablepixels@gmail.com>2015-06-26 11:25:06 -0400
committerPliablePixels <pliablepixels@gmail.com>2015-06-26 11:25:06 -0400
commit0e83a778b541591ef468d7ebda1493a000a545e5 (patch)
treee891381b97791d98edbbd70af4963606d494e659 /www/js/StateCtrl.js
parent9972b3e9171a400d7fc239385b3e1e8c3fd1b9bc (diff)
Added option to keep screen on when viewing footage, also cleaned up invocation of cordova plugins when in desktop - it now checks so spurious errors don't show in logs
Diffstat (limited to 'www/js/StateCtrl.js')
-rw-r--r--www/js/StateCtrl.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/www/js/StateCtrl.js b/www/js/StateCtrl.js
index 13ca288c..ec3a771a 100644
--- a/www/js/StateCtrl.js
+++ b/www/js/StateCtrl.js
@@ -30,6 +30,18 @@ angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup'
getLoadStatus();
getDiskStatus();
+ //-------------------------------------------------------------------------
+ // Lets make sure we set screen dim properly as we enter
+ // The problem is we enter other states before we leave previous states
+ // from a callback perspective in ionic, so we really can't predictably
+ // 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.enter', function () {
+ console.log("**VIEW ** Montage Ctrl Entered");
+ ZMDataModel.setAwake(false);
+ });
+
//----------------------------------------------------------------------
// returns disk space in gigs taken up by events
//----------------------------------------------------------------------