Change into switch expression to make it concise

This commit is contained in:
yell0wsuit 2024-04-07 00:10:32 +07:00
parent d2571fb5d5
commit a0cd13377e
No known key found for this signature in database
GPG key ID: 5B4F198A9800F6F4

View file

@ -117,20 +117,13 @@ namespace Ryujinx.Ava
}
// Convert PlatformThemeVariant to the expected ThemeVariant type
private ThemeVariant ConvertThemeVariant(PlatformThemeVariant platformThemeVariant)
{
switch (platformThemeVariant)
private ThemeVariant ConvertThemeVariant(PlatformThemeVariant platformThemeVariant) =>
platformThemeVariant switch
{
case PlatformThemeVariant.Dark:
return ThemeVariant.Dark;
case PlatformThemeVariant.Light:
return ThemeVariant.Light;
default:
return ThemeVariant.Default;
}
}
PlatformThemeVariant.Dark => ThemeVariant.Dark,
PlatformThemeVariant.Light => ThemeVariant.Light,
_ => ThemeVariant.Default,
};
private ThemeVariant DetectSystemTheme()
{