stop scanning after user navigates via the incoming data menu
This commit is contained in:
parent
fb4810da0c
commit
353aa46575
2 changed files with 8 additions and 9 deletions
|
|
@ -62,6 +62,7 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
|
||||||
$scope.$on("$ionicView.afterEnter", function() {
|
$scope.$on("$ionicView.afterEnter", function() {
|
||||||
// try initializing and refreshing status any time the view is entered
|
// try initializing and refreshing status any time the view is entered
|
||||||
scannerService.gentleInitialize();
|
scannerService.gentleInitialize();
|
||||||
|
scannerService.resumePreview();
|
||||||
});
|
});
|
||||||
|
|
||||||
function activate(){
|
function activate(){
|
||||||
|
|
|
||||||
|
|
@ -17,26 +17,24 @@ angular.module('copayApp.directives')
|
||||||
});
|
});
|
||||||
scope.hide = function() {
|
scope.hide = function() {
|
||||||
scope.showMenu = false;
|
scope.showMenu = false;
|
||||||
|
$rootScope.$broadcast('incomingDataMenu.menuHidden');
|
||||||
};
|
};
|
||||||
scope.sendPaymentToAddress = function(bitcoinAddress) {
|
scope.sendPaymentToAddress = function(bitcoinAddress) {
|
||||||
scope.hide();
|
scope.showMenu = false;
|
||||||
$state.go('tabs.send');
|
$state.go('tabs.send');
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$state.transitionTo('tabs.send.amount', {toAddress: bitcoinAddress});
|
$state.transitionTo('tabs.send.amount', {toAddress: bitcoinAddress});
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
scope.addToAddressBook = function(bitcoinAddress) {
|
scope.addToAddressBook = function(bitcoinAddress) {
|
||||||
scope.hide();
|
scope.showMenu = false;
|
||||||
$state.go('tabs.send');
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$state.transitionTo('tabs.send.addressbook', {addressbookEntry: bitcoinAddress});
|
$state.go('tabs.send');
|
||||||
|
$timeout(function() {
|
||||||
|
$state.transitionTo('tabs.send.addressbook', {addressbookEntry: bitcoinAddress});
|
||||||
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
scope.$watch('showMenu', function() {
|
|
||||||
if(!scope.showMenu) {
|
|
||||||
$rootScope.$broadcast('incomingDataMenu.menuHidden');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue