diff --git a/apps/settings/src/components/AppList.vue b/apps/settings/src/components/AppList.vue index 2ce13f32ef244..f6ce1514754e8 100644 --- a/apps/settings/src/components/AppList.vue +++ b/apps/settings/src/components/AppList.vue @@ -325,13 +325,14 @@ export default { OC.Notification.show(error) }) }, - updateAll() { + async updateAll() { const limit = pLimit(1) - this.apps - .filter(app => app.update) + const updateTasks = this.apps + .filter((app) => app.update) .map((app) => limit(() => { this.update(app.id) })) + await Promise.all(updateTasks) }, }, } diff --git a/apps/settings/src/mixins/AppManagement.js b/apps/settings/src/mixins/AppManagement.js index acde23bfc08dc..284eb1dda8482 100644 --- a/apps/settings/src/mixins/AppManagement.js +++ b/apps/settings/src/mixins/AppManagement.js @@ -249,11 +249,11 @@ export default { }, update(appId) { if (this.app?.app_api) { - this.appApiStore.updateApp(appId) + return this.appApiStore.updateApp(appId) .then(() => { rebuildNavigation() }) .catch((error) => { showError(error) }) } else { - this.$store.dispatch('updateApp', { appId }) + return this.$store.dispatch('updateApp', { appId }) .catch((error) => { showError(error) }) .then(() => { rebuildNavigation()