diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-03-06 11:13:29 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2024-03-07 22:40:31 +0100 |
commit | 876e2d6198040553cdf0b184fb585b3b63048a7d (patch) | |
tree | bccdffb7f66222df0f5261c26a38c845a640abe7 /apps/updatenotification | |
parent | 26728846b40bb1819ad4de507f397b944d15877b (diff) | |
download | nextcloud-server-876e2d6198040553cdf0b184fb585b3b63048a7d.tar.gz nextcloud-server-876e2d6198040553cdf0b184fb585b3b63048a7d.zip |
feat(AppManager): Provide `getAppIcon` function
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/updatenotification')
-rw-r--r-- | apps/updatenotification/lib/Notification/AppUpdateNotifier.php | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/apps/updatenotification/lib/Notification/AppUpdateNotifier.php b/apps/updatenotification/lib/Notification/AppUpdateNotifier.php index 9fb40e76a13..d5509bfcd75 100644 --- a/apps/updatenotification/lib/Notification/AppUpdateNotifier.php +++ b/apps/updatenotification/lib/Notification/AppUpdateNotifier.php @@ -84,16 +84,7 @@ class AppUpdateNotifier implements INotifier { // Prepare translation factory for requested language $l = $this->l10nFactory->get(Application::APP_NAME, $languageCode); - // See if we can find the app icon - if not fall back to default icon - $possibleIcons = [$appId . '-dark.svg', 'app-dark.svg', $appId . '.svg', 'app.svg']; - $icon = null; - foreach ($possibleIcons as $iconName) { - try { - $icon = $this->urlGenerator->imagePath($appId, $iconName); - } catch (\RuntimeException $e) { - // ignore - } - } + $icon = $this->appManager->getAppIcon($appId); if ($icon === null) { $icon = $this->urlGenerator->imagePath('core', 'default-app-icon'); } |