From 25037e3f5f6ab95c512461e9ee7c87e995c4aef1 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sun, 4 Jan 2026 20:51:25 +1100 Subject: [PATCH] update IcoPath if existing is different to the selected --- Flow.Launcher/Storage/QueryHistory.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/Storage/QueryHistory.cs b/Flow.Launcher/Storage/QueryHistory.cs index 3c5c7000c..56e032c51 100644 --- a/Flow.Launcher/Storage/QueryHistory.cs +++ b/Flow.Launcher/Storage/QueryHistory.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text.Json.Serialization; @@ -45,6 +45,11 @@ namespace Flow.Launcher.Storage Items.Clear(); } + /// + /// Records a result into the last-opened history list (). + /// This will also update the IcoPath if existing history item has one that is different. + /// + /// The result to add to history. Must have a non-empty .. public void Add(Result result) { if (string.IsNullOrEmpty(result.OriginQuery.TrimmedQuery)) return; @@ -63,6 +68,9 @@ namespace Flow.Launcher.Storage TryGetLastOpenedHistoryResult(result, out var existingHistoryItem)) { existingHistoryItem.ExecutedDateTime = DateTime.Now; + + if (existingHistoryItem.IcoPath != result.IcoPath) + existingHistoryItem.IcoPath = result.IcoPath; } else {