Returning actions

This commit is contained in:
01Dri 2025-10-15 00:34:38 -03:00
parent 9ca7c8431b
commit 10d353defe
2 changed files with 7 additions and 9 deletions

View file

@ -36,6 +36,7 @@ namespace Flow.Launcher.Storage
public void Add(Result result)
{
if (string.IsNullOrEmpty(result.OriginQuery.RawQuery)) return;
if (string.IsNullOrEmpty(result.PluginID)) return;
// Maintain the max history limit
if (LastOpenedHistoryItems.Count > _maxHistory)

View file

@ -1358,20 +1358,17 @@ namespace Flow.Launcher.ViewModel
{
if (reflectResult.Action != null)
{
reflectResult.Action(c);
return reflectResult.Action(c);
}
else if (reflectResult.AsyncAction != null)
if (reflectResult.AsyncAction != null)
{
await reflectResult.AsyncAction(c);
return await reflectResult.AsyncAction(c);
}
return false;
}
else
{
App.API.BackToQueryResults();
App.API.ChangeQuery(h.Query);
return false;
}
App.API.BackToQueryResults();
App.API.ChangeQuery(h.Query);
return false;
},
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE81C")
};