set lock/unlock properly
This commit is contained in:
parent
34413278ec
commit
e5ecc111f3
5 changed files with 54 additions and 51 deletions
|
|
@ -3,10 +3,10 @@
|
|||
angular.module('copayApp.services').factory('pincodeService', function($log, $rootScope, $ionicModal, configService) {
|
||||
var root = {};
|
||||
|
||||
var openPincodeModal = function(opts) {
|
||||
root.lockChange = function(opts) {
|
||||
var scope = $rootScope.$new(true);
|
||||
scope.from = opts.from;
|
||||
scope.enabled = opts.enabled;
|
||||
scope.locking = opts.locking;
|
||||
$ionicModal.fromTemplateUrl('views/modals/pincode.html', {
|
||||
scope: scope,
|
||||
backdropClickToClose: false,
|
||||
|
|
@ -17,12 +17,6 @@ angular.module('copayApp.services').factory('pincodeService', function($log, $ro
|
|||
});
|
||||
};
|
||||
|
||||
root.lockChange = function(opts) {
|
||||
if (opts.enabled) console.log('Locking app from service');
|
||||
else console.log('Unlocking app from service');
|
||||
openPincodeModal(opts);
|
||||
};
|
||||
|
||||
root.isLocked = function() {
|
||||
var config = configService.getSync();
|
||||
return config.pincode ? config.pincode.enabled : false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue