From 1464936b512efa66fe348798374b9a2c21b2dd40 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 17 Jul 2026 18:15:13 +0200 Subject: [PATCH] fix(appstore): initialize the exApps store when enabled - resolves: https://github.com/nextcloud/server/issues/61709 Signed-off-by: Ferdinand Thiessen --- apps/appstore/src/store/apps.ts | 54 +++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/apps/appstore/src/store/apps.ts b/apps/appstore/src/store/apps.ts index 11fac2ba464c9..0540a68fa5ecb 100644 --- a/apps/appstore/src/store/apps.ts +++ b/apps/appstore/src/store/apps.ts @@ -231,6 +231,38 @@ export const useAppsStore = defineStore('apps', () => { } } + // initialize store + initialize() + + return { + apps, + bundles, + categories, + isLoadingApps, + isLoadingCategories, + + disableApp, + enableApp, + uninstallApp, + enableBundle, + + getAppById, + getAppsByCategory, + getCategoryById, + limitAppToGroups, + } + + /** + * Initialize the store + */ + async function initialize() { + await Promise.allSettled([ + loadApps(), + loadCategories(), + exApps.isEnabled ? exApps.initialize() : Promise.resolve(), + ]) + } + /** * Load the app categories from the backend */ @@ -260,26 +292,4 @@ export const useAppsStore = defineStore('apps', () => { isLoadingApps.value = false } } - - // initialize store - loadApps() - loadCategories() - - return { - apps, - bundles, - categories, - isLoadingApps, - isLoadingCategories, - - disableApp, - enableApp, - uninstallApp, - enableBundle, - - getAppById, - getAppsByCategory, - getCategoryById, - limitAppToGroups, - } })