From 10d353defe6dfb42ed20f04db78f5091c41218cf Mon Sep 17 00:00:00 2001 From: 01Dri Date: Wed, 15 Oct 2025 00:34:38 -0300 Subject: [PATCH] Returning actions --- Flow.Launcher/Storage/QueryHistory.cs | 1 + Flow.Launcher/ViewModel/MainViewModel.cs | 15 ++++++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Flow.Launcher/Storage/QueryHistory.cs b/Flow.Launcher/Storage/QueryHistory.cs index 7d264d09f..8284f7eea 100644 --- a/Flow.Launcher/Storage/QueryHistory.cs +++ b/Flow.Launcher/Storage/QueryHistory.cs @@ -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) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 8fd6de6f5..d9bcf0a33 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -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") };