From 0e83a778b541591ef468d7ebda1493a000a545e5 Mon Sep 17 00:00:00 2001 From: PliablePixels Date: Fri, 26 Jun 2015 11:25:06 -0400 Subject: 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 --- www/js/StateCtrl.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'www/js/StateCtrl.js') 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 //---------------------------------------------------------------------- -- cgit v1.2.3