summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-09-23 15:45:58 -0400
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-09-23 15:45:58 -0400
commit8cea5699b969021be9be5f4a00d08b65143827f9 (patch)
treef524304322d8214c32dcad0e0ff660fde7a23b47
parent118da43241f5c381068232e66c3fd01032c6a59c (diff)
staged out API calls - hoping chrome won't balk
-rw-r--r--www/js/StateCtrl.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/www/js/StateCtrl.js b/www/js/StateCtrl.js
index fbf48671..c72563c9 100644
--- a/www/js/StateCtrl.js
+++ b/www/js/StateCtrl.js
@@ -4,7 +4,7 @@
// controller for State View
-angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup', '$scope', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$ionicLoading', '$ionicModal', '$state', '$http', function ($ionicPopup, $scope,zm, ZMDataModel, $ionicSideMenuDelegate, $ionicLoading, $ionicModal, $state, $http, $rootScope) {
+angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup', '$scope', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$ionicLoading', '$ionicModal', '$state', '$http', '$timeout',function ($ionicPopup, $scope,zm, ZMDataModel, $ionicSideMenuDelegate, $ionicLoading, $ionicModal, $state, $http, $rootScope, $timeout) {
//----------------------------------------------------------------------
// Controller main
@@ -30,9 +30,12 @@ angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup'
var inProgress = 0; // prevents user from another op if one is in progress
getRunStatus();
- getLoadStatus();
- getDiskStatus();
- getCurrentState();
+
+ // Let's stagger this by 500ms each to see if Chrome lets these through
+
+ $timeout( function() {getLoadStatus();},500);
+ $timeout( function() {getDiskStatus();},1000);
+ $timeout( function() {getCurrentState();},1500);
//-------------------------------------------------------------------------
// Lets make sure we set screen dim properly as we enter