File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
apps/settings/lib/Controller Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -204,13 +204,18 @@ private function fetchApps() {
204204 }
205205
206206 $ apps = $ this ->getAppsForCategory ('' );
207+ $ supportedApps = $ appClass ->getSupportedApps ();
207208 foreach ($ apps as $ app ) {
208209 $ app ['appstore ' ] = true ;
209210 if (!array_key_exists ($ app ['id ' ], $ this ->allApps )) {
210211 $ this ->allApps [$ app ['id ' ]] = $ app ;
211212 } else {
212213 $ this ->allApps [$ app ['id ' ]] = array_merge ($ app , $ this ->allApps [$ app ['id ' ]]);
213214 }
215+
216+ if (in_array ($ app ['id ' ], $ supportedApps )) {
217+ $ this ->allApps [$ app ['id ' ]]['level ' ] = \OC_App::supportedApp;
218+ }
214219 }
215220
216221 // add bundle information
Original file line number Diff line number Diff line change @@ -773,6 +773,18 @@ public static function getAllApps(): array {
773773 return $ apps ;
774774 }
775775
776+ /**
777+ * List all supported apps
778+ *
779+ * @return array
780+ */
781+ public function getSupportedApps (): array {
782+ /** @var \OCP\Support\Subscription\IRegistry $subscriptionRegistry */
783+ $ subscriptionRegistry = \OC ::$ server ->query (\OCP \Support \Subscription \IRegistry::class);
784+ $ supportedApps = $ subscriptionRegistry ->delegateGetSupportedApps ();
785+ return $ supportedApps ;
786+ }
787+
776788 /**
777789 * List all apps, this is used in apps.php
778790 *
@@ -787,9 +799,7 @@ public function listAllApps(): array {
787799 $ appList = [];
788800 $ langCode = \OC ::$ server ->getL10N ('core ' )->getLanguageCode ();
789801 $ urlGenerator = \OC ::$ server ->getURLGenerator ();
790- /** @var \OCP\Support\Subscription\IRegistry $subscriptionRegistry */
791- $ subscriptionRegistry = \OC ::$ server ->query (\OCP \Support \Subscription \IRegistry::class);
792- $ supportedApps = $ subscriptionRegistry ->delegateGetSupportedApps ();
802+ $ supportedApps = $ this ->getSupportedApps ();
793803
794804 foreach ($ installedApps as $ app ) {
795805 if (array_search ($ app , $ blacklist ) === false ) {
You can’t perform that action at this time.
0 commit comments