mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Returning actions
This commit is contained in:
parent
9ca7c8431b
commit
10d353defe
2 changed files with 7 additions and 9 deletions
|
|
@ -36,6 +36,7 @@ namespace Flow.Launcher.Storage
|
||||||
public void Add(Result result)
|
public void Add(Result result)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(result.OriginQuery.RawQuery)) return;
|
if (string.IsNullOrEmpty(result.OriginQuery.RawQuery)) return;
|
||||||
|
if (string.IsNullOrEmpty(result.PluginID)) return;
|
||||||
|
|
||||||
// Maintain the max history limit
|
// Maintain the max history limit
|
||||||
if (LastOpenedHistoryItems.Count > _maxHistory)
|
if (LastOpenedHistoryItems.Count > _maxHistory)
|
||||||
|
|
|
||||||
|
|
@ -1358,20 +1358,17 @@ namespace Flow.Launcher.ViewModel
|
||||||
{
|
{
|
||||||
if (reflectResult.Action != null)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
App.API.BackToQueryResults();
|
||||||
{
|
App.API.ChangeQuery(h.Query);
|
||||||
App.API.BackToQueryResults();
|
return false;
|
||||||
App.API.ChangeQuery(h.Query);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE81C")
|
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE81C")
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue