mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Only stop querying for global query
This commit is contained in:
parent
34dc0d0220
commit
9bc58fe9da
1 changed files with 10 additions and 6 deletions
|
|
@ -79,9 +79,10 @@ namespace Flow.Launcher.ViewModel
|
||||||
_selectedResults = Results;
|
_selectedResults = Results;
|
||||||
|
|
||||||
InitializeKeyCommands();
|
InitializeKeyCommands();
|
||||||
RegisterResultsUpdatedEvent();
|
|
||||||
|
|
||||||
RegisterResultUpdate();
|
RegisterResultUpdate();
|
||||||
|
RegisterResultsUpdatedEvent();
|
||||||
|
|
||||||
|
|
||||||
SetHotkey(_settings.Hotkey, OnHotkey);
|
SetHotkey(_settings.Hotkey, OnHotkey);
|
||||||
SetCustomPluginHotkey();
|
SetCustomPluginHotkey();
|
||||||
|
|
@ -423,11 +424,14 @@ namespace Flow.Launcher.ViewModel
|
||||||
var plugins = PluginManager.ValidPluginsForQuery(query);
|
var plugins = PluginManager.ValidPluginsForQuery(query);
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
// Wait 45 millisecond for query change
|
if (plugins.Count > 1)
|
||||||
// if query stay the same, update the view
|
{
|
||||||
await Task.Delay(45);
|
// Wait 45 millisecond for query change in global query
|
||||||
if (!(_lastQuery.Search == query.Search))
|
// if query changes, return so that it won't be calculated
|
||||||
return;
|
await Task.Delay(45);
|
||||||
|
if (!(_lastQuery.Search == query.Search))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_ = Task.Delay(200, currentCancellationToken).ContinueWith(_ =>
|
_ = Task.Delay(200, currentCancellationToken).ContinueWith(_ =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue