Skip to content

Commit b13c29a

Browse files
committed
Record user selection after successful execution
1 parent df4f08b commit b13c29a

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,25 +1358,12 @@ private List<Result> GetHistoryItems(IEnumerable<LastOpenedHistoryItem> historyI
13581358
var reflectResult = await ResultHelper.PopulateResultsAsync(h);
13591359
if (reflectResult != null)
13601360
{
1361-
if (reflectResult.Action != null)
1362-
{
1363-
// Record the user selected record for result ranking
1364-
_userSelectedRecord.Add(reflectResult);
1365-
1366-
// Since some actions may need to hide the Flow window to execute
1367-
// So let us populate the results of them
1368-
return reflectResult.Action(c);
1369-
}
1370-
if (reflectResult.AsyncAction != null)
1371-
{
1372-
// Record the user selected record for result ranking
1373-
_userSelectedRecord.Add(reflectResult);
1374-
1375-
// Since some actions may need to hide the Flow window to execute
1376-
// So let us populate the results of them
1377-
return await reflectResult.AsyncAction(c);
1378-
}
1379-
return false;
1361+
// Record the user selected record for result ranking
1362+
_userSelectedRecord.Add(reflectResult);
1363+
1364+
// Since some actions may need to hide the Flow window to execute
1365+
// So let us populate the results of them
1366+
return await reflectResult.ExecuteAsync(c);
13801367
}
13811368

13821369
// If we cannot get the result, fallback to re-query

0 commit comments

Comments
 (0)