Check if permission has been granted, if so, activate the camera

This commit is contained in:
Sebastiaan Pasma 2018-05-28 10:52:31 +02:00
commit a0b0f1a30b

View file

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