diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-08-02 11:15:33 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-08-02 11:15:33 -0400 |
| commit | 09fdcb32a4e8766c19b8f59a3eb81a244dfd940a (patch) | |
| tree | cf0439f741b9661d8d4fc6a19bf052a30d3d252c /www/js | |
| parent | c89196934f5c83b117afdc6c2061f1efe4a2c60a (diff) | |
#292 - more tweaks
Former-commit-id: eceaa8441b84e832cb910cf486e824e1652b2dd8
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/DataModel.js | 6 | ||||
| -rw-r--r-- | www/js/app.js | 31 |
2 files changed, 14 insertions, 23 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 4a02f5bc..8b5f44a0 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -97,7 +97,7 @@ angular.module('zmApp.controllers') 'packeryPositions': '', 'packerySizes': '', 'timelineModalGraphType': 'all', - 'resumeDelay': 300, + 'resumeDelay': 0, 'language': 'en', 'reachability': true, 'forceImageModePath': false, @@ -593,9 +593,11 @@ angular.module('zmApp.controllers') if (typeof loginData.resumeDelay == 'undefined') { zmDebug("resumeDelay does not exist. Setting to 0"); - loginData.resumeDelay = "0"; + loginData.resumeDelay = 0; } + // override resumeDelay - it was developed on a wrong assumption + loginData.resumeDelay = 0; diff --git a/www/js/app.js b/www/js/app.js index 849365d3..27cb9b18 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -646,7 +646,10 @@ angular.module('zmApp', [ }); //------------------------------------------------------------------ - // doLogin() emits this when our auth credentials work + // broadcasted after : + // a) device is ready + // b) language loaded + // c) localforage data loaded //------------------------------------------------------------------ $rootScope.$on("init-complete", function () { @@ -654,6 +657,9 @@ angular.module('zmApp', [ $state.go("zm-portal-login"); }); + //------------------------------------------------------------------ + // doLogin() emits this when our auth credentials work + //------------------------------------------------------------------ $rootScope.$on("auth-success", function () { var contentBannerInstance = $ionicContentBanner.show({ @@ -1726,24 +1732,7 @@ angular.module('zmApp', [ }); - - // if none of the above states are matched, use this as the fallback - var defaultState = "/zm-portal-login"; - //var defaultState = "/login"; - // as it turns out I can't really inject a factory in config the normal way - - - //$urlRouterProvider.otherwise(defaultState); - - // https://github.com/angular-ui/ui-router/issues/600 - // If I start using the urlRouterProvider above and the - // first state is monitors it goes into a digest loop. - - $urlRouterProvider.otherwise(function ($injector, $location) { - var $state = $injector.get("$state"); - // we will do this after data is loaded - // $state.go("zm-portal-login"); - - }); - +// We are NOT going to default route. Routing to a view will start on + // a broadcast of "init-complete" + }); //config
\ No newline at end of file |
