Skip to content

Commit a2d9957

Browse files
Jack251970Copilot
andauthored
Log warning if cannot find matched theme
Co-authored-by: Copilot <[email protected]>
1 parent b3aa897 commit a2d9957

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Flow.Launcher.Core/Resource/Theme.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,12 @@ private string GetThemePath(string themeName)
384384
public ThemeData GetCurrentTheme()
385385
{
386386
var themes = GetAvailableThemes();
387-
return themes.FirstOrDefault(t => t.FileNameWithoutExtension == _settings.Theme) ?? themes.FirstOrDefault();
387+
var matchingTheme = themes.FirstOrDefault(t => t.FileNameWithoutExtension == _settings.Theme);
388+
if (matchingTheme == null)
389+
{
390+
Log.Warn($"No matching theme found for '{_settings.Theme}'. Falling back to the first available theme.");
391+
}
392+
return matchingTheme ?? themes.FirstOrDefault();
388393
}
389394

390395
public List<ThemeData> GetAvailableThemes()

0 commit comments

Comments
 (0)