Skip to content

Commit 935d41d

Browse files
committed
Ensure combability of glyph setter
1 parent 0f0ee9f commit 935d41d

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

Flow.Launcher.Plugin/Result.cs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.IO;
44
using System.Threading.Tasks;
@@ -164,10 +164,25 @@ public string BadgeIcoPath
164164
[JsonIgnore]
165165
public IconDelegate BadgeIcon = null;
166166

167+
private GlyphInfo _glyph;
168+
167169
/// <summary>
168170
/// Information for Glyph Icon (Prioritized than IcoPath/Icon if user enable Glyph Icons)
169171
/// </summary>
170-
public GlyphInfo Glyph { get; set; }
172+
public GlyphInfo Glyph
173+
{
174+
get => _glyph;
175+
init => _glyph = value;
176+
}
177+
178+
/// <summary>
179+
/// Set the Glyph Icon
180+
/// </summary>
181+
/// <param name="glyph"></param>
182+
public void SetGlyph(GlyphInfo glyph)
183+
{
184+
_glyph = glyph;
185+
}
171186

172187
/// <summary>
173188
/// An action to take in the form of a function call when the result has been selected.

Flow.Launcher/Storage/QueryHistory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void Add(Result result)
7878

7979
if (existingHistoryItem.Glyph?.Glyph != result.Glyph?.Glyph
8080
|| existingHistoryItem.Glyph?.FontFamily != result.Glyph?.FontFamily)
81-
existingHistoryItem.Glyph = result.Glyph;
81+
existingHistoryItem.SetGlyph(result.Glyph);
8282
}
8383
else
8484
{

0 commit comments

Comments
 (0)