Skip to content

Commit 9036002

Browse files
committed
update glyph when history result exists
1 parent e970bb4 commit 9036002

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

Flow.Launcher.Plugin/Result.cs

Lines changed: 2 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;
@@ -167,7 +167,7 @@ public string BadgeIcoPath
167167
/// <summary>
168168
/// Information for Glyph Icon (Prioritized than IcoPath/Icon if user enable Glyph Icons)
169169
/// </summary>
170-
public GlyphInfo Glyph { get; init; }
170+
public GlyphInfo Glyph { get; set; }
171171

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

Flow.Launcher/Storage/QueryHistory.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Text.Json.Serialization;
55
using Flow.Launcher.Core.Plugin;
66
using Flow.Launcher.Plugin;
7+
using Svg;
78

89
namespace Flow.Launcher.Storage
910
{
@@ -72,10 +73,13 @@ public void Add(Result result)
7273
TryGetLastOpenedHistoryResult(result, out var existingHistoryItem))
7374
{
7475
existingHistoryItem.ExecutedDateTime = DateTime.Now;
76+
7577
if (existingHistoryItem.IcoPath != result.IcoPath)
76-
{
7778
existingHistoryItem.IcoPath = result.IcoPath;
78-
}
79+
80+
if (existingHistoryItem.Glyph.Glyph != result.Glyph.Glyph
81+
|| existingHistoryItem.Glyph.FontFamily != result.Glyph.FontFamily)
82+
existingHistoryItem.Glyph = result.Glyph;
7983
}
8084
else
8185
{

0 commit comments

Comments
 (0)