From eae2efea67f98474f355adf0ac538d9f2485b600 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 31 Aug 2017 12:52:03 -0400 Subject: [PATCH] hide "on lock" option for firefox and edge --- src/popup/app/settings/settingsController.js | 7 ++++++- src/popup/app/settings/views/settings.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/popup/app/settings/settingsController.js b/src/popup/app/settings/settingsController.js index a40cc0a423..df68fedb3d 100644 --- a/src/popup/app/settings/settingsController.js +++ b/src/popup/app/settings/settingsController.js @@ -4,12 +4,17 @@ .controller('settingsController', function ($scope, $state, SweetAlert, utilsService, $analytics, i18nService, constantsService, cryptoService, lockService) { utilsService.initListSectionItemListeners($(document), angular); + $scope.showOnLocked = !utilsService.isFirefox() && !utilsService.isEdge(); $scope.lockOption = ''; $scope.i18n = i18nService; chrome.storage.local.get(constantsService.lockOptionKey, function (obj) { if (obj && (obj[constantsService.lockOptionKey] || obj[constantsService.lockOptionKey] === 0)) { - $scope.lockOption = obj[constantsService.lockOptionKey].toString(); + var option = obj[constantsService.lockOptionKey].toString(); + if (option === '-2' && !$scope.showOnLocked) { + option = '-1'; + } + $scope.lockOption = option; } else { $scope.lockOption = ''; diff --git a/src/popup/app/settings/views/settings.html b/src/popup/app/settings/views/settings.html index c9d348ca8a..afa7c78705 100644 --- a/src/popup/app/settings/views/settings.html +++ b/src/popup/app/settings/views/settings.html @@ -18,7 +18,7 @@ - +