improve performance and UX - handle history views properly

This commit is contained in:
JDonadio 2017-03-08 16:02:34 -03:00
commit d4c8576032
4 changed files with 16 additions and 52 deletions

View file

@ -1,26 +0,0 @@
'use strict';
angular.module('copayApp.services').factory('pincodeService', function($log, $rootScope, $ionicModal, configService) {
var root = {};
root.lockChange = function(opts) {
var scope = $rootScope.$new(true);
scope.fromSettings = opts.fromSettings;
scope.locking = opts.locking;
$ionicModal.fromTemplateUrl('views/modals/pincode.html', {
scope: scope,
backdropClickToClose: false,
hardwareBackButtonClose: false
}).then(function(modal) {
scope.pincodeModal = modal;
scope.pincodeModal.show();
});
};
root.isLocked = function() {
var config = configService.getSync();
return config.pincode ? config.pincode.enabled : false;
};
return root;
});