mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Log warning if cannot find matched theme
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
b3aa89773c
commit
a2d9957385
1 changed files with 6 additions and 1 deletions
|
|
@ -384,7 +384,12 @@ namespace Flow.Launcher.Core.Resource
|
|||
public ThemeData GetCurrentTheme()
|
||||
{
|
||||
var themes = GetAvailableThemes();
|
||||
return themes.FirstOrDefault(t => t.FileNameWithoutExtension == _settings.Theme) ?? themes.FirstOrDefault();
|
||||
var matchingTheme = themes.FirstOrDefault(t => t.FileNameWithoutExtension == _settings.Theme);
|
||||
if (matchingTheme == null)
|
||||
{
|
||||
Log.Warn($"No matching theme found for '{_settings.Theme}'. Falling back to the first available theme.");
|
||||
}
|
||||
return matchingTheme ?? themes.FirstOrDefault();
|
||||
}
|
||||
|
||||
public List<ThemeData> GetAvailableThemes()
|
||||
|
|
|
|||
Loading…
Reference in a new issue