mirror of
https://github.com/bitwarden/mobile
synced 2026-01-04 17:43:17 +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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user