mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-29 14:26:20 +00:00
fix autoDark
This commit is contained in:
parent
881d694f77
commit
5f5bd7ec6a
1 changed files with 5 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue