diff --git a/src/js/controllers/tab-scan.js b/src/js/controllers/tab-scan.js index 0c1b463b3..3f14ebfa3 100644 --- a/src/js/controllers/tab-scan.js +++ b/src/js/controllers/tab-scan.js @@ -62,6 +62,7 @@ angular.module('copayApp.controllers').controller('tabScanController', function( $scope.$on("$ionicView.afterEnter", function() { // try initializing and refreshing status any time the view is entered scannerService.gentleInitialize(); + scannerService.resumePreview(); }); function activate(){ diff --git a/src/js/directives/incomingDataMenu.js b/src/js/directives/incomingDataMenu.js index ec091557c..ef0ef46ba 100644 --- a/src/js/directives/incomingDataMenu.js +++ b/src/js/directives/incomingDataMenu.js @@ -17,26 +17,24 @@ angular.module('copayApp.directives') }); scope.hide = function() { scope.showMenu = false; + $rootScope.$broadcast('incomingDataMenu.menuHidden'); }; scope.sendPaymentToAddress = function(bitcoinAddress) { - scope.hide(); + scope.showMenu = false; $state.go('tabs.send'); $timeout(function() { $state.transitionTo('tabs.send.amount', {toAddress: bitcoinAddress}); }, 100); }; scope.addToAddressBook = function(bitcoinAddress) { - scope.hide(); - $state.go('tabs.send'); + scope.showMenu = false; $timeout(function() { - $state.transitionTo('tabs.send.addressbook', {addressbookEntry: bitcoinAddress}); + $state.go('tabs.send'); + $timeout(function() { + $state.transitionTo('tabs.send.addressbook', {addressbookEntry: bitcoinAddress}); + }); }, 100); }; - scope.$watch('showMenu', function() { - if(!scope.showMenu) { - $rootScope.$broadcast('incomingDataMenu.menuHidden'); - } - }); } }; });