Skip to content

Commit 629c2eb

Browse files
committed
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.
1 parent c73689f commit 629c2eb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,12 @@ private async Task OpenResultAsync(string index)
532532
Hide();
533533
}
534534
}
535+
536+
// Record user selected result for result ranking
537+
_userSelectedRecord.Add(result);
538+
// Add item to histroy only if it is from results but not context menu or history
535539
if (queryResultsSelected)
536540
{
537-
_userSelectedRecord.Add(result);
538541
_history.Add(result);
539542
lastHistoryIndex = 1;
540543
}

0 commit comments

Comments
 (0)