Change copied icon logic as origin

This commit is contained in:
Jack251970 2026-01-05 22:55:09 +08:00
parent 5b2fb1fb38
commit e403c41530
2 changed files with 14 additions and 2 deletions

View file

@ -35,9 +35,9 @@ namespace Flow.Launcher.Storage
LastOpenedHistoryItems.Add(new LastOpenedHistoryResult
{
Title = Localize.executeQuery(item.Query),
IcoPath = Constant.HistoryIcon,
IcoPath = null,
OriginQuery = new Query { TrimmedQuery = item.Query },
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE81C"),
Glyph = null,
Query = item.Query,
Action = _ =>
{

View file

@ -1352,6 +1352,18 @@ namespace Flow.Launcher.ViewModel
if (Settings.HistoryStyle == HistoryStyle.Query)
{
copiedItem.Title = Localize.executeQuery(copiedItem.Query);
copiedItem.IcoPath = Constant.HistoryIcon;
// TODO: Add Glyph here
// copiedItem.Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE81C");
}
else
{
if (string.IsNullOrEmpty(copiedItem.IcoPath)) // Must manually set missing image icon here
{
copiedItem.IcoPath = Constant.MissingImgIcon;
}
copiedItem.ShowBadge = true;
copiedItem.BadgeIcoPath = Constant.HistoryIcon;
}
// Subtitle has datetime which can cause duplicates when saving.