From 25aec80e4c146f6dfb6870b4b9e8db4e9843d2c6 Mon Sep 17 00:00:00 2001
From: Matt Portune <59324545+mportune-bw@users.noreply.github.com>
Date: Thu, 27 Feb 2020 23:14:26 -0500
Subject: [PATCH] Change switch binding back to using EnforcedPolicyOptions
directly (#744)
---
src/App/Pages/Generator/GeneratorPage.xaml | 12 ++++++++----
src/App/Pages/Generator/GeneratorPageViewModel.cs | 14 +-------------
2 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/src/App/Pages/Generator/GeneratorPage.xaml b/src/App/Pages/Generator/GeneratorPage.xaml
index f51301e2c..e4630f1cf 100644
--- a/src/App/Pages/Generator/GeneratorPage.xaml
+++ b/src/App/Pages/Generator/GeneratorPage.xaml
@@ -176,7 +176,8 @@
HorizontalOptions="StartAndExpand" />
@@ -188,7 +189,8 @@
HorizontalOptions="StartAndExpand" />
@@ -200,7 +202,8 @@
HorizontalOptions="StartAndExpand" />
@@ -212,7 +215,8 @@
HorizontalOptions="StartAndExpand" />
diff --git a/src/App/Pages/Generator/GeneratorPageViewModel.cs b/src/App/Pages/Generator/GeneratorPageViewModel.cs
index afe888ac7..b0af77a78 100644
--- a/src/App/Pages/Generator/GeneratorPageViewModel.cs
+++ b/src/App/Pages/Generator/GeneratorPageViewModel.cs
@@ -229,11 +229,7 @@ namespace Bit.App.Pages
set => SetProperty(ref _enforcedPolicyOptions, value,
additionalPropertyNames: new[]
{
- nameof(IsPolicyInEffect),
- nameof(IsUppercaseSwitchEnabled),
- nameof(IsLowercaseSwitchEnabled),
- nameof(IsNumberSwitchEnabled),
- nameof(IsSpecialSwitchEnabled)
+ nameof(IsPolicyInEffect)
});
}
@@ -242,14 +238,6 @@ namespace Bit.App.Pages
_enforcedPolicyOptions.NumberCount > 0 || _enforcedPolicyOptions.UseSpecial ||
_enforcedPolicyOptions.SpecialCount > 0;
- public bool IsUppercaseSwitchEnabled => !IsPolicyInEffect || !EnforcedPolicyOptions.UseUppercase;
-
- public bool IsLowercaseSwitchEnabled => !IsPolicyInEffect || !EnforcedPolicyOptions.UseLowercase;
-
- public bool IsNumberSwitchEnabled => !IsPolicyInEffect || !EnforcedPolicyOptions.UseNumbers;
-
- public bool IsSpecialSwitchEnabled => !IsPolicyInEffect || !EnforcedPolicyOptions.UseSpecial;
-
public int TypeSelectedIndex
{
get => _typeSelectedIndex;