Skip to content

Commit 1298b76

Browse files
committed
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.
1 parent 4b6ee4e commit 1298b76

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,12 +1357,18 @@ private List<Result> GetHistoryItems(IEnumerable<LastOpenedHistoryItem> historyI
13571357
{
13581358
if (reflectResult.Action != null)
13591359
{
1360+
// Record the user selected record for result ranking
1361+
_userSelectedRecord.Add(reflectResult);
1362+
13601363
// Since some actions may need to hide the Flow window to execute
13611364
// So let us populate the results of them
13621365
return reflectResult.Action(c);
13631366
}
13641367
if (reflectResult.AsyncAction != null)
13651368
{
1369+
// Record the user selected record for result ranking
1370+
_userSelectedRecord.Add(reflectResult);
1371+
13661372
// Since some actions may need to hide the Flow window to execute
13671373
// So let us populate the results of them
13681374
return await reflectResult.AsyncAction(c);

0 commit comments

Comments
 (0)