From 65438e837d2f5bb9857fc8d83ff7dd5bbd91badd Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 30 May 2017 13:23:45 -0400 Subject: [PATCH] check android for event wireup --- .../Pages/Settings/SettingsFeaturesPage.cs | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/App/Pages/Settings/SettingsFeaturesPage.cs b/src/App/Pages/Settings/SettingsFeaturesPage.cs index 52cf9d5b7..a0944d422 100644 --- a/src/App/Pages/Settings/SettingsFeaturesPage.cs +++ b/src/App/Pages/Settings/SettingsFeaturesPage.cs @@ -177,9 +177,13 @@ namespace Bit.App.Pages AnalyticsCell.OnChanged += AnalyticsCell_Changed; StackLayout.LayoutChanged += Layout_LayoutChanged; - AutofillAlwaysCell.OnChanged += AutofillAlwaysCell_OnChanged; - AutofillPasswordFieldCell.OnChanged += AutofillPasswordFieldCell_OnChanged; - AutofillPersistNotificationCell.OnChanged += AutofillPersistNotificationCell_OnChanged; + + if(Device.RuntimePlatform == Device.Android) + { + AutofillAlwaysCell.OnChanged += AutofillAlwaysCell_OnChanged; + AutofillPasswordFieldCell.OnChanged += AutofillPasswordFieldCell_OnChanged; + AutofillPersistNotificationCell.OnChanged += AutofillPersistNotificationCell_OnChanged; + } } protected override void OnDisappearing() @@ -188,9 +192,13 @@ namespace Bit.App.Pages AnalyticsCell.OnChanged -= AnalyticsCell_Changed; StackLayout.LayoutChanged -= Layout_LayoutChanged; - AutofillAlwaysCell.OnChanged -= AutofillAlwaysCell_OnChanged; - AutofillPasswordFieldCell.OnChanged -= AutofillPasswordFieldCell_OnChanged; - AutofillPersistNotificationCell.OnChanged -= AutofillPersistNotificationCell_OnChanged; + + if(Device.RuntimePlatform == Device.Android) + { + AutofillAlwaysCell.OnChanged -= AutofillAlwaysCell_OnChanged; + AutofillPasswordFieldCell.OnChanged -= AutofillPasswordFieldCell_OnChanged; + AutofillPersistNotificationCell.OnChanged -= AutofillPersistNotificationCell_OnChanged; + } } private void Layout_LayoutChanged(object sender, EventArgs e) @@ -217,7 +225,7 @@ namespace Bit.App.Pages { return; } - + if(cell.On) { AutofillPasswordFieldCell.On = false;