perf(startupService): speedup perceived load time by removing animations before the splashscreen hid
This commit is contained in:
parent
4de3cad712
commit
ec343e4991
4 changed files with 12 additions and 5 deletions
|
|
@ -959,6 +959,9 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
$log.info('Init profile...');
|
||||
// Try to open local profile
|
||||
profileService.loadAndBindProfile(function(err) {
|
||||
$ionicHistory.nextViewOptions({
|
||||
disableAnimate: true
|
||||
});
|
||||
if (err) {
|
||||
if (err.message && err.message.match('NOPROFILE')) {
|
||||
$log.debug('No profile... redirecting');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.services').service('startupService', function($log) {
|
||||
angular.module('copayApp.services').service('startupService', function($log, $timeout) {
|
||||
|
||||
var splashscreenVisible = true;
|
||||
var statusBarVisible = false;
|
||||
|
|
@ -8,7 +8,9 @@ angular.module('copayApp.services').service('startupService', function($log) {
|
|||
function _hideSplash(){
|
||||
if(navigator.splashscreen && splashscreenVisible){
|
||||
$log.debug('startupService is hiding the splashscreen...');
|
||||
navigator.splashscreen.hide();
|
||||
$timeout(function(){
|
||||
navigator.splashscreen.hide();
|
||||
}, 20);
|
||||
splashscreenVisible = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue