mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Ensure combability of glyph setter
This commit is contained in:
parent
0f0ee9ffde
commit
935d41dc26
2 changed files with 18 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -164,10 +164,25 @@ namespace Flow.Launcher.Plugin
|
|||
[JsonIgnore]
|
||||
public IconDelegate BadgeIcon = null;
|
||||
|
||||
private GlyphInfo _glyph;
|
||||
|
||||
/// <summary>
|
||||
/// Information for Glyph Icon (Prioritized than IcoPath/Icon if user enable Glyph Icons)
|
||||
/// </summary>
|
||||
public GlyphInfo Glyph { get; set; }
|
||||
public GlyphInfo Glyph
|
||||
{
|
||||
get => _glyph;
|
||||
init => _glyph = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the Glyph Icon
|
||||
/// </summary>
|
||||
/// <param name="glyph"></param>
|
||||
public void SetGlyph(GlyphInfo glyph)
|
||||
{
|
||||
_glyph = glyph;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An action to take in the form of a function call when the result has been selected.
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ namespace Flow.Launcher.Storage
|
|||
|
||||
if (existingHistoryItem.Glyph?.Glyph != result.Glyph?.Glyph
|
||||
|| existingHistoryItem.Glyph?.FontFamily != result.Glyph?.FontFamily)
|
||||
existingHistoryItem.Glyph = result.Glyph;
|
||||
existingHistoryItem.SetGlyph(result.Glyph);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue