perf(startupService): remove timers, control splashscreen and statusbar from startupService

This commit is contained in:
Jason Dreyzehner 2016-10-11 22:46:07 -04:00
commit 4de3cad712
6 changed files with 46 additions and 8 deletions

View file

@ -0,0 +1,26 @@
'use strict';
angular.module('copayApp.services').service('startupService', function($log) {
var splashscreenVisible = true;
var statusBarVisible = false;
function _hideSplash(){
if(navigator.splashscreen && splashscreenVisible){
$log.debug('startupService is hiding the splashscreen...');
navigator.splashscreen.hide();
splashscreenVisible = false;
}
}
function _showStatusBar(){
if(StatusBar && !statusBarVisible){
$log.debug('startupService is showing the StatusBar...');
StatusBar.show();
statusBarVisible = true;
}
}
this.ready = function() {
_showStatusBar();
_hideSplash();
};
});