mirror of
https://github.com/bitwarden/mobile
synced 2025-12-27 21:53:57 +00:00
restart app after theme change
This commit is contained in:
@@ -86,8 +86,9 @@
|
||||
StyleClass="box-value" />
|
||||
</StackLayout>
|
||||
<Label
|
||||
StyleClass="box-footer-label"
|
||||
Text="{u:I18n ThemeDescription}"
|
||||
StyleClass="box-footer-label" />
|
||||
x:Name="_themeDescriptionLabel" />
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Bit.App.Resources;
|
||||
using System;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Pages
|
||||
@@ -15,6 +16,11 @@ namespace Bit.App.Pages
|
||||
_themePicker.ItemDisplayBinding = new Binding("Value");
|
||||
_uriMatchPicker.ItemDisplayBinding = new Binding("Value");
|
||||
_clearClipboardPicker.ItemDisplayBinding = new Binding("Value");
|
||||
if(Device.RuntimePlatform == Device.Android)
|
||||
{
|
||||
_themeDescriptionLabel.Text = string.Concat(_themeDescriptionLabel.Text, " ",
|
||||
AppResources.RestartIsRequired);
|
||||
}
|
||||
}
|
||||
|
||||
protected async override void OnAppearing()
|
||||
|
||||
@@ -177,7 +177,8 @@ namespace Bit.App.Pages
|
||||
await _storageService.SaveAsync(Constants.ThemeKey, theme);
|
||||
if(Device.RuntimePlatform == Device.Android)
|
||||
{
|
||||
await _deviceActionService.ShowLoadingAsync(AppResources.Saving);
|
||||
await _deviceActionService.ShowLoadingAsync(AppResources.Restarting);
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
_messagingService.Send("updatedTheme", theme);
|
||||
}
|
||||
|
||||
18
src/App/Resources/AppResources.Designer.cs
generated
18
src/App/Resources/AppResources.Designer.cs
generated
@@ -3057,6 +3057,24 @@ namespace Bit.App.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Restarting....
|
||||
/// </summary>
|
||||
public static string Restarting {
|
||||
get {
|
||||
return ResourceManager.GetString("Restarting", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Restart is required..
|
||||
/// </summary>
|
||||
public static string RestartIsRequired {
|
||||
get {
|
||||
return ResourceManager.GetString("RestartIsRequired", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Re-type Master Password.
|
||||
/// </summary>
|
||||
|
||||
@@ -1557,4 +1557,11 @@
|
||||
<data name="ThemeDescription" xml:space="preserve">
|
||||
<value>Change the application's color theme.</value>
|
||||
</data>
|
||||
<data name="RestartIsRequired" xml:space="preserve">
|
||||
<value>Restart is required.</value>
|
||||
<comment>Referring to restarting the application.</comment>
|
||||
</data>
|
||||
<data name="Restarting" xml:space="preserve">
|
||||
<value>Restarting...</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user