Record user selection after successful execution

This commit is contained in:
Jack251970 2025-10-15 12:40:00 +08:00
parent df4f08b071
commit b13c29ab91

View file

@ -1358,25 +1358,12 @@ namespace Flow.Launcher.ViewModel
var reflectResult = await ResultHelper.PopulateResultsAsync(h);
if (reflectResult != null)
{
if (reflectResult.Action != null)
{
// Record the user selected record for result ranking
_userSelectedRecord.Add(reflectResult);
// 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);
}
return false;
// 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);
}
// If we cannot get the result, fallback to re-query