Change into switch expression to make it concise

This commit is contained in:
yell0wsuit 2024-04-07 00:10:32 +07:00
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 // Convert PlatformThemeVariant to the expected ThemeVariant type
private ThemeVariant ConvertThemeVariant(PlatformThemeVariant platformThemeVariant) private ThemeVariant ConvertThemeVariant(PlatformThemeVariant platformThemeVariant) =>
{ platformThemeVariant switch
switch (platformThemeVariant)
{ {
case PlatformThemeVariant.Dark: PlatformThemeVariant.Dark => ThemeVariant.Dark,
return ThemeVariant.Dark; PlatformThemeVariant.Light => ThemeVariant.Light,
_ => ThemeVariant.Default,
case PlatformThemeVariant.Light: };
return ThemeVariant.Light;
default:
return ThemeVariant.Default;
}
}
private ThemeVariant DetectSystemTheme() private ThemeVariant DetectSystemTheme()
{ {