Skip to content

Commit

Permalink
FIX: refresh updatable packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mabasian committed Sep 4, 2024
1 parent 313c979 commit a9caf0c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ const updateAll = async () => {
await fetchUpgradablePackages();
serverStore.upgradablePackages.value = [];
serverStore.numberOfUpdatablePackages = 0;
updateStatus.message = "All packages updated successfully!";
updateStatus.color = "text-green-500";
} catch (error) {
Expand All @@ -203,6 +207,11 @@ const updatePackage = async (item) => {
updateUIWithInProgressMessage(pkgName);
try {
const result = await ControlService.updatePackage(pkgName);
serverStore.upgradablePackages.value = serverStore.upgradablePackages.value.filter((pkg) => pkg.packageName !== item.packageName);
serverStore.numberOfUpdatablePackages = serverStore.upgradablePackages.value.length;
if (result) {
await getUpgradablePackages(); // Refresh the list
}
Expand Down

0 comments on commit a9caf0c

Please sign in to comment.