mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
fix logic
This commit is contained in:
parent
b86a2a8f5f
commit
9eeb04ec13
1 changed files with 12 additions and 9 deletions
|
|
@ -68,17 +68,20 @@ namespace Flow.Launcher.ViewModel
|
|||
OnPropertyChanged(nameof(Image));
|
||||
});
|
||||
|
||||
if (Result.Glyph.FontFamily.Contains('/'))
|
||||
if (Result.Glyph is { FontFamily: not null } glyph)
|
||||
{
|
||||
var fontPath = Result.Glyph.FontFamily;
|
||||
Glyph = Path.IsPathRooted(fontPath) ? Result.Glyph : Result.Glyph with
|
||||
if (glyph.FontFamily.Contains('/'))
|
||||
{
|
||||
FontFamily = Path.Combine(Result.PluginDirectory, fontPath)
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
Glyph = Result.Glyph;
|
||||
var fontPath = Result.Glyph.FontFamily;
|
||||
Glyph = Path.IsPathRooted(fontPath) ? Result.Glyph : Result.Glyph with
|
||||
{
|
||||
FontFamily = Path.Combine(Result.PluginDirectory, fontPath)
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
Glyph = glyph;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue