From 629c2eb4c65b752a5796f5268f138468e514656d Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 15 Oct 2025 12:26:21 +0800 Subject: [PATCH] Record user-selected results for ranking Moved `_userSelectedRecord.Add(result)` outside the `if (queryResultsSelected)` block to ensure all user-selected results are recorded, regardless of their source (query results, context menu, or history). Added a comment to clarify that only query results are added to history. --- Flow.Launcher/ViewModel/MainViewModel.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 14f6dda39..4c5c0229c 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -532,9 +532,12 @@ namespace Flow.Launcher.ViewModel Hide(); } } + + // Record user selected result for result ranking + _userSelectedRecord.Add(result); + // Add item to histroy only if it is from results but not context menu or history if (queryResultsSelected) { - _userSelectedRecord.Add(result); _history.Add(result); lastHistoryIndex = 1; }