From 3745c444556c2edd818d11fc0a779b1e5215612f Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Tue, 6 Jan 2026 20:11:36 +0800
Subject: [PATCH] Revert `Update the result when executing history item`
---
Flow.Launcher/Storage/QueryHistory.cs | 23 -----------------------
Flow.Launcher/ViewModel/MainViewModel.cs | 6 ------
2 files changed, 29 deletions(-)
diff --git a/Flow.Launcher/Storage/QueryHistory.cs b/Flow.Launcher/Storage/QueryHistory.cs
index 803591662..6af2a5908 100644
--- a/Flow.Launcher/Storage/QueryHistory.cs
+++ b/Flow.Launcher/Storage/QueryHistory.cs
@@ -86,29 +86,6 @@ namespace Flow.Launcher.Storage
}
}
- ///
- /// Update a result into the last-opened history list ().
- ///
- public void Update(Result result)
- {
- if (string.IsNullOrEmpty(result.OriginQuery.TrimmedQuery)) return;
- // History results triggered from homepage do not contain PluginID,
- // these are intentionally not saved otherwise cause duplicates due to subtitle
- // containing datetime string.
- if (string.IsNullOrEmpty(result.PluginID)) return;
-
- // If the last item is the same as the current result, just update the timestamp and the icon path
- if (LastOpenedHistoryItems.Count > 0 &&
- TryGetLastOpenedHistoryResult(result, out var existingHistoryItem))
- {
- existingHistoryItem.ExecutedDateTime = DateTime.Now;
- if (existingHistoryItem.IcoPath != result.IcoPath)
- {
- existingHistoryItem.IcoPath = result.IcoPath;
- }
- }
- }
-
///
/// Attempts to find an existing in
/// that is considered equal to the supplied .
diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs
index 3d5c99edc..63710b5fc 100644
--- a/Flow.Launcher/ViewModel/MainViewModel.cs
+++ b/Flow.Launcher/ViewModel/MainViewModel.cs
@@ -1373,12 +1373,6 @@ namespace Flow.Launcher.ViewModel
var reflectResult = await ResultHelper.PopulateResultsAsync(item);
if (reflectResult != null)
{
- // Record the user selected record for result ranking
- _userSelectedRecord.Add(reflectResult);
-
- // Update the history with the reflected result
- _history.Update(reflectResult);
-
// Since some actions may need to hide the Flow window to execute
// So let us populate the results of them
return await reflectResult.ExecuteAsync(c);