fix autoDark

This commit is contained in:
Tsuki 2023-04-01 20:44:17 +08:00
parent 881d694f77
commit 5f5bd7ec6a

View file

@ -1716,18 +1716,13 @@ namespace v2rayN.ViewModels
{
var theme = _paletteHelper.GetTheme();
//add follow systemTheme
var systemTheme = OSAppTheme.Light;
if (Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Mobile"){
systemTheme = Application.Current.RequestedTheme;
}
else{
systemTheme = Windows.UI.Xaml.Application.Current.RequestedTheme;
}
if (systemTheme == OSAppTheme.Dark){
var systemTheme = Windows.UI.Xaml.Application.Current.RequestedTheme;
if (systemTheme == ApplicationTheme.Dark)
{
isDarkTheme = true;
}
else if (systemTheme == OSAppTheme.Light){
else if (systemTheme == ApplicationTheme.Light)
{
isDarkTheme = false;
}