fix starting

This commit is contained in:
Matias Alejo Garcia 2017-04-18 17:19:11 -03:00
commit 43f04d4296
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
2 changed files with 6 additions and 4 deletions

View file

@ -175,7 +175,12 @@ angular.module('copayApp.controllers').controller('pinController', function($sta
$scope.close = function(delay) {
$timeout(function() {
$ionicHistory.viewHistory().backView ? $ionicHistory.goBack() : $state.go('tabs.home');
var shouldReturn = $ionicHistory.viewHistory().backView && $ionicHistory.viewHistory().backView.stateName != 'starting';
if (shouldReturn)
$ionicHistory.goBack()
else
$state.go('tabs.home');
}, delay || 1);
};
});

View file

@ -1209,12 +1209,10 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
function checkAndApplyLock(onResume) {
var defaultView = 'tabs.home';
console.log('[routes.js.1211]'); //TODO
if (!platformInfo.isCordova && !platformInfo.isDevel) {
goTo(defaultView);
}
console.log('[routes.js.1216]'); //TODO
function goTo(nextView) {
nextView = nextView || defaultView;
$state.transitionTo(nextView).then(function() {
@ -1289,7 +1287,6 @@ console.log('[routes.js.1216]'); //TODO
historyRoot: true
});
console.log('[routes.js.1289]'); //TODO
checkAndApplyLock();
});
};