mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Better handling for null values.
This commit is contained in:
@@ -62,12 +62,14 @@ namespace GHelper.UI
|
|||||||
|
|
||||||
private static bool IsDarkTheme()
|
private static bool IsDarkTheme()
|
||||||
{
|
{
|
||||||
if (AppConfig.GetString("ui_mode").ToLower() == "dark")
|
string? uiMode = AppConfig.GetString("ui_mode");
|
||||||
|
|
||||||
|
if (uiMode is not null && uiMode.ToLower() == "dark")
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AppConfig.GetString("ui_mode").ToLower() == "light")
|
if (uiMode is not null && uiMode.ToLower() == "light")
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user