mirror of https://github.com/BTCPrivate/copay.git
fix resume event navigation
This commit is contained in:
parent
3a029ab9c3
commit
d25e28f20a
|
@ -1196,28 +1196,24 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
});
|
||||
|
||||
$ionicPlatform.on('resume', function() {
|
||||
if (platformInfo.isCordova || platformInfo.isDevel) {
|
||||
configService.whenAvailable(function(config) {
|
||||
var nextView;
|
||||
var lock = config.lock;
|
||||
if (lock && lock.method == 'fingerprint' && fingerprintService.isAvailable()) {
|
||||
fingerprintService.check('unlockingApp', function(err) {
|
||||
if (err) nextView = 'lockedView';
|
||||
else if ($ionicHistory.currentStateName() == 'lockedView') nextView = 'tabs.home';
|
||||
else nextView = $ionicHistory.currentStateName();
|
||||
goTo(nextView);
|
||||
});
|
||||
} else if (lock && lock.method == 'pin') {
|
||||
goTo('pin');
|
||||
}
|
||||
configService.whenAvailable(function(config) {
|
||||
var nextView;
|
||||
var lock = config.lock;
|
||||
if (lock && lock.method == 'fingerprint' && fingerprintService.isAvailable()) {
|
||||
fingerprintService.check('unlockingApp', function(err) {
|
||||
if (err) goTo('lockedView');
|
||||
else if ($ionicHistory.currentStateName() == 'lockedView') goTo('tabs.home');
|
||||
});
|
||||
} else if (lock && lock.method == 'pin') {
|
||||
goTo('pin');
|
||||
}
|
||||
|
||||
function goTo(nextView) {
|
||||
$state.transitionTo(nextView).then(function() {
|
||||
if (nextView == 'lockedView') $ionicHistory.clearHistory();
|
||||
});
|
||||
};
|
||||
});
|
||||
}
|
||||
function goTo(nextView) {
|
||||
$state.transitionTo(nextView).then(function() {
|
||||
if (nextView == 'lockedView') $ionicHistory.clearHistory();
|
||||
});
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
$ionicPlatform.on('menubutton', function() {
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
</ion-nav-bar>
|
||||
|
||||
<ion-content>
|
||||
<div ng-if="appName == 'copay'" class="img-container-copay" ng-click="requestFingerprint()">
|
||||
<div ng-if="appName == 'copay'" class="img-container-copay">
|
||||
<i class="icon big-icon-svg"><div class="bg"></div></i>
|
||||
</div>
|
||||
<div ng-if="appName == 'bitpay'" class="img-container-bitpay" ng-click="requestFingerprint()">
|
||||
<div ng-if="appName == 'bitpay'" class="img-container-bitpay">
|
||||
<i class="icon big-icon-svg"><div class="bg"></div></i>
|
||||
</div>
|
||||
<div class="comments" ng-click="requestFingerprint()">
|
||||
<div class="comments">
|
||||
<div class="header" translate>One-touch Sign In</div>
|
||||
<div class="text-content" translate>Please place your fingertip on the scanner to verify your identity</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue