Skip to content

Commit

Permalink
feat: update catalog after reset so that there is immediate feedback
Browse files Browse the repository at this point in the history
(cherry picked from commit fbcdb9f)
  • Loading branch information
iadonkey committed Dec 14, 2023
1 parent e91cc92 commit 9d921cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion TwinpackVsixShared/Dialogs/CatalogWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@ private async void Dialog_Loaded(object sender, RoutedEventArgs e)
{
_installedPackages.Clear();
_availablePackages.Clear();
UpdateCatalog();

IsCatalogLoading = true;
cmbTwinpackServer.Items.Clear();
cmbTwinpackServer.Items.Add(_twinpackServer.TwinpackUrlBase);
Expand Down Expand Up @@ -575,6 +577,7 @@ public async void EditPackageButton_Click(object sender, RoutedEventArgs e)
_twinpackServer.InvalidateCache();
_installedPackages.Clear();
_availablePackages.Clear();
UpdateCatalog();
await LoadInstalledPackagesAsync(Token);
await LoadAvailablePackagesAsync(SearchTextBox.Text, Token);
UpdateCatalog();
Expand Down Expand Up @@ -1143,6 +1146,7 @@ public async void LoginButton_Click(object sender, RoutedEventArgs e)
{
_availablePackages.Clear();
_twinpackServer.InvalidateCache();
UpdateCatalog();
await LoadAvailablePackagesAsync("", Token);
}
catch (Exception ex)
Expand Down Expand Up @@ -1501,12 +1505,12 @@ public async void ReloadButton_Click(object sender, RoutedEventArgs e)
_twinpackServer.InvalidateCache();
_installedPackages.Clear();
_availablePackages.Clear();
UpdateCatalog();
_context.Dte.ExecuteCommand("File.SaveAll");

if(!IsConfigured)
await LoadPlcConfigAsync(Token);


await LoadInstalledPackagesAsync(Token);
await LoadAvailablePackagesAsync(SearchTextBox.Text, Token);
UpdateCatalog();
Expand Down

0 comments on commit 9d921cc

Please sign in to comment.