mirror of
https://github.com/bitwarden/mobile
synced 2025-12-18 01:03:24 +00:00
Account switching
This commit is contained in:
@@ -3,6 +3,8 @@ using Bit.App.Models;
|
||||
using Bit.App.Services;
|
||||
using Bit.App.Styles;
|
||||
using Bit.Core;
|
||||
using Bit.Core.Abstractions;
|
||||
using Bit.Core.Utilities;
|
||||
using Xamarin.Forms;
|
||||
#if !FDROID
|
||||
using Microsoft.AppCenter.Crashes;
|
||||
@@ -93,16 +95,15 @@ namespace Bit.App.Utilities
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetTheme(bool android, ResourceDictionary resources)
|
||||
public static void SetTheme(ResourceDictionary resources)
|
||||
{
|
||||
SetThemeStyle(GetTheme(android), resources);
|
||||
SetThemeStyle(GetTheme(), resources);
|
||||
}
|
||||
|
||||
public static string GetTheme(bool android)
|
||||
public static string GetTheme()
|
||||
{
|
||||
return Xamarin.Essentials.Preferences.Get(
|
||||
string.Format(PreferencesStorageService.KeyFormat, Constants.ThemeKey), default(string),
|
||||
!android ? "group.com.8bit.bitwarden" : default(string));
|
||||
var stateService = ServiceContainer.Resolve<IStateService>("stateService");
|
||||
return stateService.GetThemeAsync().GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public static bool OsDarkModeEnabled()
|
||||
|
||||
Reference in New Issue
Block a user