Merge pull request #5440 from bitjson/bug/desktop-scanner
Improve scanner handling on all platforms
This commit is contained in:
commit
cfb22c2acd
2 changed files with 15 additions and 12 deletions
|
|
@ -57,8 +57,10 @@ 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();
|
||||
if(!scannerService.isInitialized()){
|
||||
scannerService.gentleInitialize();
|
||||
}
|
||||
activate();
|
||||
});
|
||||
|
||||
function activate(){
|
||||
|
|
@ -79,6 +81,8 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
|
|||
handleSuccessfulScan(contents);
|
||||
}
|
||||
});
|
||||
// resume preview if paused
|
||||
scannerService.resumePreview();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -101,7 +105,6 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
|
|||
}
|
||||
|
||||
$rootScope.$on('incomingDataMenu.menuHidden', function() {
|
||||
scannerService.resumePreview();
|
||||
activate();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue