mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
Fix Query builder test (#86)
* Revert base viewModel class to fix tests.
This commit is contained in:
committed by
GitHub
parent
154e5aab8e
commit
59b0109918
@@ -13,13 +13,7 @@ namespace Wox.Plugin
|
|||||||
[NotifyPropertyChangedInvocator]
|
[NotifyPropertyChangedInvocator]
|
||||||
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||||
{
|
{
|
||||||
if (Application.Current.Dispatcher.CheckAccess())
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
||||||
else
|
|
||||||
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
|
||||||
{
|
|
||||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -383,15 +383,7 @@ namespace Wox.ViewModel
|
|||||||
// handle the exclusiveness of plugin using action keyword
|
// handle the exclusiveness of plugin using action keyword
|
||||||
RemoveOldQueryResults(query);
|
RemoveOldQueryResults(query);
|
||||||
|
|
||||||
_lastQuery = 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);
|
var plugins = PluginManager.ValidPluginsForQuery(query);
|
||||||
|
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
|
|||||||
Reference in New Issue
Block a user