From 1298b76b7781c0a5b957c78c17d08e4dd0552767 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 15 Oct 2025 12:23:52 +0800 Subject: [PATCH] Track user-selected results for ranking purposes Added logic to record user-selected results in `_userSelectedRecord` before executing both synchronous and asynchronous actions. This enables tracking of user interactions for result ranking or analytics. Comments were added to clarify the purpose of the new logic. --- Flow.Launcher/ViewModel/MainViewModel.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 4df87208c..14f6dda39 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1357,12 +1357,18 @@ namespace Flow.Launcher.ViewModel { if (reflectResult.Action != null) { + // Record the user selected record for result ranking + _userSelectedRecord.Add(reflectResult); + // Since some actions may need to hide the Flow window to execute // So let us populate the results of them return reflectResult.Action(c); } if (reflectResult.AsyncAction != null) { + // Record the user selected record for result ranking + _userSelectedRecord.Add(reflectResult); + // Since some actions may need to hide the Flow window to execute // So let us populate the results of them return await reflectResult.AsyncAction(c);