diff --git a/src/modules/launcher/Wox.Plugin/BaseModel.cs b/src/modules/launcher/Wox.Plugin/BaseModel.cs index c332529d36..54c13be576 100644 --- a/src/modules/launcher/Wox.Plugin/BaseModel.cs +++ b/src/modules/launcher/Wox.Plugin/BaseModel.cs @@ -13,13 +13,7 @@ namespace Wox.Plugin [NotifyPropertyChangedInvocator] protected void OnPropertyChanged([CallerMemberName] string propertyName = null) { - if (Application.Current.Dispatcher.CheckAccess()) - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - else - Application.Current.Dispatcher.BeginInvoke(new Action(() => - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - })); + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } } } \ No newline at end of file diff --git a/src/modules/launcher/Wox/ViewModel/MainViewModel.cs b/src/modules/launcher/Wox/ViewModel/MainViewModel.cs index acce23da85..aa5f1ba516 100644 --- a/src/modules/launcher/Wox/ViewModel/MainViewModel.cs +++ b/src/modules/launcher/Wox/ViewModel/MainViewModel.cs @@ -383,15 +383,7 @@ namespace Wox.ViewModel // handle the exclusiveness of plugin using action keyword 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); - + _lastQuery = query; var plugins = PluginManager.ValidPluginsForQuery(query); Task.Run(() =>