mirror of
https://github.com/bitwarden/mobile
synced 2025-12-15 07:43:37 +00:00
Dynamic theme switching and visual tweaks (#1556)
* Dynamic theme switching and visual tweaks * update action runner to use macos-11 for iOS 15 support * additional tweaks * refinements * refinements * formatting and tweaks
This commit is contained in:
@@ -200,6 +200,7 @@ namespace Bit.App
|
||||
|
||||
private async void ResumedAsync()
|
||||
{
|
||||
UpdateTheme();
|
||||
await _vaultTimeoutService.CheckVaultTimeoutAsync();
|
||||
_messagingService.Send("startEventTimer");
|
||||
await ClearCacheIfNeededAsync();
|
||||
@@ -337,6 +338,10 @@ namespace Bit.App
|
||||
InitializeComponent();
|
||||
SetCulture();
|
||||
ThemeManager.SetTheme(Device.RuntimePlatform == Device.Android, Current.Resources);
|
||||
Current.RequestedThemeChanged += (s, a) =>
|
||||
{
|
||||
UpdateTheme();
|
||||
};
|
||||
Current.MainPage = new HomePage();
|
||||
var mainPageTask = SetMainPageAsync();
|
||||
ServiceContainer.Resolve<MobilePlatformUtilsService>("platformUtilsService").Init();
|
||||
@@ -359,6 +364,15 @@ namespace Bit.App
|
||||
});
|
||||
}
|
||||
|
||||
private void UpdateTheme()
|
||||
{
|
||||
Device.BeginInvokeOnMainThread(() =>
|
||||
{
|
||||
ThemeManager.SetTheme(Device.RuntimePlatform == Device.Android, Current.Resources);
|
||||
_messagingService.Send("updatedTheme");
|
||||
});
|
||||
}
|
||||
|
||||
private async Task LockedAsync(bool autoPromptBiometric)
|
||||
{
|
||||
await _stateService.PurgeAsync();
|
||||
|
||||
Reference in New Issue
Block a user