mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add remove previous query result back to keep different action word distinct
This commit is contained in:
parent
ebddf19ba2
commit
1b76da175f
2 changed files with 8 additions and 8 deletions
|
|
@ -424,7 +424,7 @@ namespace Flow.Launcher.ViewModel
|
|||
if (query != null)
|
||||
{
|
||||
// handle the exclusiveness of plugin using action keyword
|
||||
// RemoveOldQueryResults(query);
|
||||
RemoveOldQueryResults(query);
|
||||
|
||||
_lastQuery = query;
|
||||
Task.Delay(200, currentCancellationToken).ContinueWith(_ =>
|
||||
|
|
@ -483,18 +483,18 @@ namespace Flow.Launcher.ViewModel
|
|||
{
|
||||
if (!string.IsNullOrEmpty(keyword))
|
||||
{
|
||||
Results.RemoveResultsExcept(PluginManager.NonGlobalPlugins[keyword].Metadata);
|
||||
Results.KeepResultsFor(PluginManager.NonGlobalPlugins[keyword].Metadata);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(keyword))
|
||||
{
|
||||
Results.RemoveResultsFor(PluginManager.NonGlobalPlugins[lastKeyword].Metadata);
|
||||
Results.KeepResultsExcept(PluginManager.NonGlobalPlugins[lastKeyword].Metadata);
|
||||
}
|
||||
else if (lastKeyword != keyword)
|
||||
{
|
||||
Results.RemoveResultsExcept(PluginManager.NonGlobalPlugins[keyword].Metadata);
|
||||
Results.KeepResultsFor(PluginManager.NonGlobalPlugins[keyword].Metadata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,14 +119,14 @@ namespace Flow.Launcher.ViewModel
|
|||
Results.RemoveAll();
|
||||
}
|
||||
|
||||
public void RemoveResultsExcept(PluginMetadata metadata)
|
||||
public void KeepResultsFor(PluginMetadata metadata)
|
||||
{
|
||||
//Results.RemoveAll(r => r.Result.PluginID != metadata.ID);
|
||||
Results.Update(Results.Where(r => r.Result.PluginID == metadata.ID).ToList());
|
||||
}
|
||||
|
||||
public void RemoveResultsFor(PluginMetadata metadata)
|
||||
public void KeepResultsExcept(PluginMetadata metadata)
|
||||
{
|
||||
//Results.RemoveAll(r => r.Result.PluginID == metadata.ID);
|
||||
Results.Update(Results.Where(r => r.Result.PluginID != metadata.ID).ToList());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue