From 6b4b6759409692989f0534db6e310787380ed6c7 Mon Sep 17 00:00:00 2001 From: JDonadio Date: Thu, 20 Apr 2017 13:05:33 -0300 Subject: [PATCH] remove popup confirmation --- src/js/controllers/lockSetup.js | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/js/controllers/lockSetup.js b/src/js/controllers/lockSetup.js index bce070ae9..072979cb4 100644 --- a/src/js/controllers/lockSetup.js +++ b/src/js/controllers/lockSetup.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('lockSetupController', function($state, $scope, $timeout, $log, configService, popupService, gettextCatalog, appConfigService, fingerprintService, profileService, lodash) { +angular.module('copayApp.controllers').controller('lockSetupController', function($state, $scope, $timeout, $log, configService, gettextCatalog, fingerprintService, profileService, lodash) { function init() { $scope.options = [ @@ -97,37 +97,21 @@ angular.module('copayApp.controllers').controller('lockSetupController', functio locking: false, }); else saveConfig(); - } else if (selectedMethod == 'fingerprint') { - if (savedMethod == 'pin') { - askForDisablePin(function(disablePin) { - if (disablePin) saveConfig('fingerprint'); - else init(); - }); - } else saveConfig('fingerprint'); } else if (selectedMethod == 'pin') { if (savedMethod == 'pin') return; $state.transitionTo('tabs.pin', { fromSettings: true, locking: savedMethod == 'pin' ? false : true }); + } else if (selectedMethod == 'fingerprint') { + if (savedMethod == 'fingerprint') return; + else saveConfig('fingerprint'); } $timeout(function() { $scope.$apply(); }); }; - function askForDisablePin(cb) { - var message = gettextCatalog.getString('{{appName}} startup is locked by PIN. Are you sure you want to disable it?', { - appName: appConfigService.nameCase - }); - var okText = gettextCatalog.getString('Continue'); - var cancelText = gettextCatalog.getString('Cancel'); - popupService.showConfirm(null, message, okText, cancelText, function(ok) { - if (!ok) return cb(false); - return cb(true); - }); - }; - function saveConfig(method) { var opts = { lock: {