mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
move progressbar task position and change the way of comparison
This commit is contained in:
parent
f11b302c37
commit
34dc0d0220
1 changed files with 10 additions and 8 deletions
|
|
@ -419,13 +419,6 @@ namespace Flow.Launcher.ViewModel
|
|||
RemoveOldQueryResults(query);
|
||||
|
||||
_lastQuery = query;
|
||||
Task.Delay(200, currentCancellationToken).ContinueWith(_ =>
|
||||
{ // start the progress bar if query takes more than 200 ms and this is the current running query and it didn't finish yet
|
||||
if (currentUpdateSource == _updateSource && _isQueryRunning)
|
||||
{
|
||||
ProgressBarVisibility = Visibility.Visible;
|
||||
}
|
||||
}, currentCancellationToken);
|
||||
|
||||
var plugins = PluginManager.ValidPluginsForQuery(query);
|
||||
Task.Run(async () =>
|
||||
|
|
@ -433,9 +426,18 @@ namespace Flow.Launcher.ViewModel
|
|||
// Wait 45 millisecond for query change
|
||||
// if query stay the same, update the view
|
||||
await Task.Delay(45);
|
||||
if (!(_lastQuery.RawQuery == QueryText))
|
||||
if (!(_lastQuery.Search == query.Search))
|
||||
return;
|
||||
|
||||
_ = Task.Delay(200, currentCancellationToken).ContinueWith(_ =>
|
||||
{
|
||||
// start the progress bar if query takes more than 200 ms and this is the current running query and it didn't finish yet
|
||||
if (currentUpdateSource == _updateSource && _isQueryRunning)
|
||||
{
|
||||
ProgressBarVisibility = Visibility.Visible;
|
||||
}
|
||||
}, currentCancellationToken);
|
||||
|
||||
// so looping will stop once it was cancelled
|
||||
var parallelOptions = new ParallelOptions { CancellationToken = currentCancellationToken };
|
||||
try
|
||||
|
|
|
|||
Loading…
Reference in a new issue