diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index 1682c4d79..e944081f9 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -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; + /// /// Information for Glyph Icon (Prioritized than IcoPath/Icon if user enable Glyph Icons) /// - public GlyphInfo Glyph { get; set; } + public GlyphInfo Glyph + { + get => _glyph; + init => _glyph = value; + } + + /// + /// Set the Glyph Icon + /// + /// + public void SetGlyph(GlyphInfo glyph) + { + _glyph = glyph; + } /// /// An action to take in the form of a function call when the result has been selected. diff --git a/Flow.Launcher/Storage/QueryHistory.cs b/Flow.Launcher/Storage/QueryHistory.cs index 0f4d97677..7bf948399 100644 --- a/Flow.Launcher/Storage/QueryHistory.cs +++ b/Flow.Launcher/Storage/QueryHistory.cs @@ -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 {