ensure scan view resumes on action sheet close
This commit is contained in:
parent
78bd523391
commit
0d34b4d2f7
3 changed files with 9 additions and 3 deletions
|
|
@ -105,6 +105,7 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
|
||||||
}
|
}
|
||||||
|
|
||||||
$rootScope.$on('incomingDataMenu.menuHidden', function() {
|
$rootScope.$on('incomingDataMenu.menuHidden', function() {
|
||||||
|
console.log('in herererere');
|
||||||
scannerService.resumePreview();
|
scannerService.resumePreview();
|
||||||
activate();
|
activate();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.directives')
|
angular.module('copayApp.directives')
|
||||||
.directive('actionSheet', function() {
|
.directive('actionSheet', function($rootScope) {
|
||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
templateUrl: 'views/includes/actionSheet.html',
|
templateUrl: 'views/includes/actionSheet.html',
|
||||||
|
|
@ -12,6 +12,7 @@ angular.module('copayApp.directives')
|
||||||
link: function(scope, element, attrs) {
|
link: function(scope, element, attrs) {
|
||||||
scope.hide = function() {
|
scope.hide = function() {
|
||||||
scope.show = false;
|
scope.show = false;
|
||||||
|
$rootScope.$broadcast('incomingDataMenu.menuHidden');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,18 @@ angular.module('copayApp.directives')
|
||||||
scope.sendPaymentToAddress = function(bitcoinAddress) {
|
scope.sendPaymentToAddress = function(bitcoinAddress) {
|
||||||
scope.showMenu = false;
|
scope.showMenu = false;
|
||||||
$state.go('tabs.send').then(function() {
|
$state.go('tabs.send').then(function() {
|
||||||
$state.transitionTo('tabs.send.amount', {toAddress: bitcoinAddress});
|
$timeout(function() {
|
||||||
|
$state.transitionTo('tabs.send.amount', {toAddress: bitcoinAddress});
|
||||||
|
}, 50);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
scope.addToAddressBook = function(bitcoinAddress) {
|
scope.addToAddressBook = function(bitcoinAddress) {
|
||||||
scope.showMenu = false;
|
scope.showMenu = false;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$state.go('tabs.send').then(function() {
|
$state.go('tabs.send').then(function() {
|
||||||
$state.transitionTo('tabs.send.addressbook', {addressbookEntry: bitcoinAddress});
|
$timeout(function() {
|
||||||
|
$state.transitionTo('tabs.send.addressbook', {addressbookEntry: bitcoinAddress});
|
||||||
|
}, 10);
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue