perf(startupService): remove timers, control splashscreen and statusbar from startupService
This commit is contained in:
parent
8035846faf
commit
4de3cad712
6 changed files with 46 additions and 8 deletions
26
src/js/services/startupService.js
Normal file
26
src/js/services/startupService.js
Normal 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();
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue