mirror of https://github.com/BTCPrivate/copay.git
Fix hidden back button
This commit is contained in:
parent
d3ee16e05b
commit
ccfe998b9d
|
@ -907,7 +907,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
.run(function($rootScope, $state, $location, $log, $timeout, $ionicHistory, $ionicPlatform, $window, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService) {
|
||||
|
||||
uxLanguage.init();
|
||||
openURLService.init();
|
||||
|
||||
$ionicPlatform.ready(function() {
|
||||
if (platformInfo.isCordova) {
|
||||
|
@ -999,6 +998,9 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
$log.debug('Profile loaded ... Starting UX.');
|
||||
scannerService.gentleInitialize();
|
||||
$state.go('tabs.home');
|
||||
$timeout(function() {
|
||||
openURLService.init();
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -40,7 +40,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
// data extensions for Payment Protocol with non-backwards-compatible request
|
||||
if ((/^bitcoin:\?r=[\w+]/).exec(data)) {
|
||||
data = decodeURIComponent(data.replace('bitcoin:?r=', ''));
|
||||
$state.go('tabs.send').then(function() {
|
||||
$state.go('tabs.send', {}, {'reload': true, 'notify': $state.current.name == 'tabs.send' ? false : true}).then(function() {
|
||||
$state.transitionTo('tabs.send.confirm', {paypro: data});
|
||||
});
|
||||
return true;
|
||||
|
@ -62,7 +62,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
handlePayPro(details);
|
||||
});
|
||||
} else {
|
||||
$state.go('tabs.send');
|
||||
$state.go('tabs.send', {}, {'reload': true, 'notify': $state.current.name == 'tabs.send' ? false : true});
|
||||
// Timeout is required to enable the "Back" button
|
||||
$timeout(function() {
|
||||
if (amount) {
|
||||
|
@ -70,7 +70,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
} else {
|
||||
$state.transitionTo('tabs.send.amount', {toAddress: addr});
|
||||
}
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
return true;
|
||||
|
||||
|
@ -102,7 +102,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
var secret = getParameterByName('secret', data);
|
||||
var email = getParameterByName('email', data);
|
||||
var otp = getParameterByName('otp', data);
|
||||
$state.go('tabs.home').then(function() {
|
||||
$state.go('tabs.home', {}, {'reload': true, 'notify': $state.current.name == 'tabs.home' ? false : true}).then(function() {
|
||||
$state.transitionTo('tabs.bitpayCardIntro', {
|
||||
secret: secret,
|
||||
email: email,
|
||||
|
@ -113,14 +113,14 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
|
||||
// Join
|
||||
} else if (data && data.match(/^copay:[0-9A-HJ-NP-Za-km-z]{70,80}$/)) {
|
||||
$state.go('tabs.home').then(function() {
|
||||
$state.go('tabs.home', {}, {'reload': true, 'notify': $state.current.name == 'tabs.home' ? false : true}).then(function() {
|
||||
$state.transitionTo('tabs.add.join', {url: data});
|
||||
});
|
||||
return true;
|
||||
|
||||
// Old join
|
||||
} else if (data && data.match(/^[0-9A-HJ-NP-Za-km-z]{70,80}$/)) {
|
||||
$state.go('tabs.home').then(function() {
|
||||
$state.go('tabs.home', {}, {'reload': true, 'notify': $state.current.name == 'tabs.home' ? false : true}).then(function() {
|
||||
$state.transitionTo('tabs.add.join', {url: data});
|
||||
});
|
||||
return true;
|
||||
|
@ -136,7 +136,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
};
|
||||
|
||||
function goToAmountPage(toAddress) {
|
||||
$state.go('tabs.send');
|
||||
$state.go('tabs.send', {}, {'reload': true, 'notify': $state.current.name == 'tabs.send' ? false : true});
|
||||
$timeout(function() {
|
||||
$state.transitionTo('tabs.send.amount', {toAddress: toAddress});
|
||||
}, 100);
|
||||
|
@ -150,7 +150,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
paypro: payProDetails
|
||||
};
|
||||
scannerService.pausePreview();
|
||||
$state.go('tabs.send').then(function() {
|
||||
$state.go('tabs.send', {}, {'reload': true, 'notify': $state.current.name == 'tabs.send' ? false : true}).then(function() {
|
||||
$timeout(function() {
|
||||
$state.transitionTo('tabs.send.confirm', stateParams);
|
||||
});
|
||||
|
|
|
@ -8,9 +8,10 @@ angular.module('copayApp.services').factory('openURLService', function($rootScop
|
|||
// Stop it from caching the first view as one to return when the app opens
|
||||
$ionicHistory.nextViewOptions({
|
||||
historyRoot: true,
|
||||
disableBack: true,
|
||||
disableBack: false,
|
||||
disableAnimation: true
|
||||
});
|
||||
|
||||
var url = args.url;
|
||||
if (!url) {
|
||||
$log.error('No url provided');
|
||||
|
|
Loading…
Reference in New Issue