Revert "Revert "Scan handling""

This reverts commit 641091e7d9.
This commit is contained in:
Marty Alcala 2016-10-26 14:00:43 -04:00
commit 22d4a92f7d
25 changed files with 511 additions and 129 deletions

View file

@ -58,6 +58,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(){
@ -95,9 +96,15 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
function handleSuccessfulScan(contents){
$log.debug('Scan returned: "' + contents + '"');
scannerService.pausePreview();
incomingData.redir(contents);
}
$rootScope.$on('incomingDataMenu.menuHidden', function() {
scannerService.resumePreview();
activate();
});
$scope.openSettings = function(){
scannerService.openSettings();
};
@ -126,7 +133,7 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
$scope.canGoBack = function(){
return $state.params.passthroughMode;
}
};
function goBack(){
$ionicHistory.nextViewOptions({
disableAnimate: true