diff --git a/src/App/Pages/Generator/GeneratorPage.xaml b/src/App/Pages/Generator/GeneratorPage.xaml index 4d141a64e..52731c790 100644 --- a/src/App/Pages/Generator/GeneratorPage.xaml +++ b/src/App/Pages/Generator/GeneratorPage.xaml @@ -62,6 +62,7 @@ Text="{u:I18n Type}" StyleClass="box-label" /> diff --git a/src/App/Pages/Generator/GeneratorPage.xaml.cs b/src/App/Pages/Generator/GeneratorPage.xaml.cs index 5e43b72aa..724f513df 100644 --- a/src/App/Pages/Generator/GeneratorPage.xaml.cs +++ b/src/App/Pages/Generator/GeneratorPage.xaml.cs @@ -2,6 +2,8 @@ using System; using System.Threading.Tasks; using Xamarin.Forms; +using Xamarin.Forms.PlatformConfiguration; +using Xamarin.Forms.PlatformConfiguration.iOSSpecific; namespace Bit.App.Pages { @@ -20,9 +22,10 @@ namespace Bit.App.Pages _vm.Page = this; _fromTabPage = fromTabPage; _selectAction = selectAction; + var isIos = Device.RuntimePlatform == Device.iOS; if(selectAction != null) { - if(Device.RuntimePlatform == Device.iOS) + if(isIos) { ToolbarItems.Add(_closeItem); } @@ -30,7 +33,7 @@ namespace Bit.App.Pages } else { - if(Device.RuntimePlatform == Device.iOS) + if(isIos) { ToolbarItems.Add(_moreItem); } @@ -39,6 +42,10 @@ namespace Bit.App.Pages ToolbarItems.Add(_historyItem); } } + if(isIos) + { + _typePicker.On().SetUpdateMode(UpdateMode.WhenFinished); + } } public async Task InitAsync() @@ -86,7 +93,7 @@ namespace Bit.App.Pages if(selection == AppResources.PasswordHistory) { var page = new GeneratorHistoryPage(); - await Navigation.PushModalAsync(new NavigationPage(page)); + await Navigation.PushModalAsync(new Xamarin.Forms.NavigationPage(page)); } } @@ -98,7 +105,7 @@ namespace Bit.App.Pages private async void History_Clicked(object sender, EventArgs e) { var page = new GeneratorHistoryPage(); - await Navigation.PushModalAsync(new NavigationPage(page)); + await Navigation.PushModalAsync(new Xamarin.Forms.NavigationPage(page)); } private async void LengthSlider_DragCompleted(object sender, EventArgs e) diff --git a/src/App/Pages/Settings/OptionsPage.xaml.cs b/src/App/Pages/Settings/OptionsPage.xaml.cs index 7333b268b..e308bc0c4 100644 --- a/src/App/Pages/Settings/OptionsPage.xaml.cs +++ b/src/App/Pages/Settings/OptionsPage.xaml.cs @@ -2,6 +2,8 @@ using Bit.App.Resources; using Bit.Core.Utilities; using Xamarin.Forms; +using Xamarin.Forms.PlatformConfiguration; +using Xamarin.Forms.PlatformConfiguration.iOSSpecific; namespace Bit.App.Pages { @@ -27,6 +29,12 @@ namespace Bit.App.Pages _themeDescriptionLabel.Text = string.Concat(_themeDescriptionLabel.Text, " ", AppResources.RestartIsRequired); } + else + { + _themePicker.On().SetUpdateMode(UpdateMode.WhenFinished); + _uriMatchPicker.On().SetUpdateMode(UpdateMode.WhenFinished); + _clearClipboardPicker.On().SetUpdateMode(UpdateMode.WhenFinished); + } } protected async override void OnAppearing() diff --git a/src/App/Pages/Settings/OptionsPageViewModel.cs b/src/App/Pages/Settings/OptionsPageViewModel.cs index 4047b68d1..290f1cc25 100644 --- a/src/App/Pages/Settings/OptionsPageViewModel.cs +++ b/src/App/Pages/Settings/OptionsPageViewModel.cs @@ -297,6 +297,11 @@ namespace Bit.App.Pages await Task.Delay(1000); } _messagingService.Send("updatedTheme", theme); + if(Device.RuntimePlatform == Device.iOS) + { + await Task.Delay(500); + await _platformUtilsService.ShowDialogAsync(AppResources.ThemeAppliedOnRestart); + } } } diff --git a/src/App/Pages/Vault/SharePage.xaml.cs b/src/App/Pages/Vault/SharePage.xaml.cs index aac4f71cb..5e3510875 100644 --- a/src/App/Pages/Vault/SharePage.xaml.cs +++ b/src/App/Pages/Vault/SharePage.xaml.cs @@ -1,4 +1,6 @@ using Xamarin.Forms; +using Xamarin.Forms.PlatformConfiguration; +using Xamarin.Forms.PlatformConfiguration.iOSSpecific; namespace Bit.App.Pages { @@ -17,6 +19,10 @@ namespace Bit.App.Pages { ToolbarItems.RemoveAt(0); } + else + { + _organizationPicker.On().SetUpdateMode(UpdateMode.WhenFinished); + } _organizationPicker.ItemDisplayBinding = new Binding("Key"); } diff --git a/src/App/Resources/AppResources.Designer.cs b/src/App/Resources/AppResources.Designer.cs index c9335ac6f..13b71ec61 100644 --- a/src/App/Resources/AppResources.Designer.cs +++ b/src/App/Resources/AppResources.Designer.cs @@ -19,7 +19,7 @@ namespace Bit.App.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class AppResources { @@ -3498,6 +3498,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to Your theme changes will apply when the app is restarted.. + /// + public static string ThemeAppliedOnRestart { + get { + return ResourceManager.GetString("ThemeAppliedOnRestart", resourceCulture); + } + } + /// /// Looks up a localized string similar to Change the application's color theme.. /// diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx index 0d6173915..e98250ab3 100644 --- a/src/App/Resources/AppResources.resx +++ b/src/App/Resources/AppResources.resx @@ -1556,4 +1556,7 @@ Auto-fill makes it easy to securely access your Bitwarden vault from other websites and apps. It looks like you have not enabled an auto-fill service for Bitwarden. Enable auto-fill for Bitwarden from the "Settings" screen. + + Your theme changes will apply when the app is restarted. + \ No newline at end of file