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() {
|
$ionicPlatform.on('resume', function() {
|
||||||
if (platformInfo.isCordova || platformInfo.isDevel) {
|
configService.whenAvailable(function(config) {
|
||||||
configService.whenAvailable(function(config) {
|
var nextView;
|
||||||
var nextView;
|
var lock = config.lock;
|
||||||
var lock = config.lock;
|
if (lock && lock.method == 'fingerprint' && fingerprintService.isAvailable()) {
|
||||||
if (lock && lock.method == 'fingerprint' && fingerprintService.isAvailable()) {
|
fingerprintService.check('unlockingApp', function(err) {
|
||||||
fingerprintService.check('unlockingApp', function(err) {
|
if (err) goTo('lockedView');
|
||||||
if (err) nextView = 'lockedView';
|
else if ($ionicHistory.currentStateName() == 'lockedView') goTo('tabs.home');
|
||||||
else if ($ionicHistory.currentStateName() == 'lockedView') nextView = 'tabs.home';
|
});
|
||||||
else nextView = $ionicHistory.currentStateName();
|
} else if (lock && lock.method == 'pin') {
|
||||||
goTo(nextView);
|
goTo('pin');
|
||||||
});
|
}
|
||||||
} else if (lock && lock.method == 'pin') {
|
|
||||||
goTo('pin');
|
|
||||||
}
|
|
||||||
|
|
||||||
function goTo(nextView) {
|
function goTo(nextView) {
|
||||||
$state.transitionTo(nextView).then(function() {
|
$state.transitionTo(nextView).then(function() {
|
||||||
if (nextView == 'lockedView') $ionicHistory.clearHistory();
|
if (nextView == 'lockedView') $ionicHistory.clearHistory();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$ionicPlatform.on('menubutton', function() {
|
$ionicPlatform.on('menubutton', function() {
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
|
|
||||||
<ion-content>
|
<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>
|
<i class="icon big-icon-svg"><div class="bg"></div></i>
|
||||||
</div>
|
</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>
|
<i class="icon big-icon-svg"><div class="bg"></div></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="comments" ng-click="requestFingerprint()">
|
<div class="comments">
|
||||||
<div class="header" translate>One-touch Sign In</div>
|
<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 class="text-content" translate>Please place your fingertip on the scanner to verify your identity</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue