Merge pull request #394 from bitjson/feature/launch-so-fast-and-so-clean

launch so fast and so clean
This commit is contained in:
Matias Alejo Garcia 2016-10-12 15:05:03 -03:00 committed by GitHub
commit 43aeaae7a2
10 changed files with 71 additions and 74 deletions

View file

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