From 4d501ba3f76ac9982f37ad9bd95b6138f1e35df3 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Sun, 6 Jun 2021 14:27:10 +0800 Subject: [PATCH] Modify logic in RemoveOldQueryResults() MainViewModel.cs --- Flow.Launcher/ViewModel/MainViewModel.cs | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index abe8d681b..9a475de1f 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -550,23 +550,10 @@ namespace Flow.Launcher.ViewModel string lastKeyword = _lastQuery.ActionKeyword; string keyword = query.ActionKeyword; - if (string.IsNullOrEmpty(lastKeyword)) + + if (lastKeyword != keyword) { - if (!string.IsNullOrEmpty(keyword)) - { - Results.KeepResultsFor(PluginManager.NonGlobalPlugins[keyword].Metadata); - } - } - else - { - if (string.IsNullOrEmpty(keyword)) - { - Results.KeepResultsExcept(PluginManager.NonGlobalPlugins[lastKeyword].Metadata); - } - else if (lastKeyword != keyword) - { - Results.KeepResultsFor(PluginManager.NonGlobalPlugins[keyword].Metadata); - } + Results.Clear(); } }