From dcb3405e7267a6eddf5392162c55ec7c591ad40f Mon Sep 17 00:00:00 2001 From: Cory Knox Date: Thu, 1 Sep 2022 15:00:05 -0700 Subject: [PATCH] (#494) Don't trigger SourcesUpdated messages With the FileSystemWatcher, we don't need to manually tell Chocolatey GUI to update the sources, as they'll be updated by the FileSystemWatcher. Leaving them in results in duplicated entries that we don't want. --- .../ViewModels/SettingsViewModel.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/ChocolateyGui.Common.Windows/ViewModels/SettingsViewModel.cs b/Source/ChocolateyGui.Common.Windows/ViewModels/SettingsViewModel.cs index f6cb4c5b8..551269e8f 100644 --- a/Source/ChocolateyGui.Common.Windows/ViewModels/SettingsViewModel.cs +++ b/Source/ChocolateyGui.Common.Windows/ViewModels/SettingsViewModel.cs @@ -453,7 +453,6 @@ public async Task Save() } _originalId = DraftSource?.Id; - await _eventAggregator.PublishOnUIThreadAsync(new SourcesUpdatedMessage()); } catch (UnauthorizedAccessException) { @@ -486,7 +485,6 @@ public async Task Remove() await _chocolateyService.RemoveSource(_originalId); Sources.Remove(SelectedSource); SelectedSource = null; - await _eventAggregator.PublishOnUIThreadAsync(new SourcesUpdatedMessage()); } catch (UnauthorizedAccessException) {