Merge pull request #153 from Bitcoin-com/wallet/task/358

Improvement - 358 - Workflow camera permission
This commit is contained in:
Jean-Baptiste Dominguez 2018-06-04 14:30:52 +09:00 committed by GitHub
commit 437bd77ba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,11 +60,14 @@ 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 var capabilities = scannerService.getCapabilities();
if(!scannerService.isInitialized()) { if (capabilities.hasPermission) {
scannerService.gentleInitialize(); // try initializing and refreshing status any time the view is entered
if(!scannerService.isInitialized()) {
scannerService.gentleInitialize();
}
activate();
} }
activate();
}); });
function activate(){ function activate(){