From 7af7f79b64cf1901f8d2f3c987cffddfa842b883 Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 1 Sep 2023 16:04:38 +0530 Subject: [PATCH] replace photos with memories --- lib/Service/AppsService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Service/AppsService.php b/lib/Service/AppsService.php index 50d3649..4f8c88e 100644 --- a/lib/Service/AppsService.php +++ b/lib/Service/AppsService.php @@ -23,7 +23,7 @@ class AppsService { private IURLGenerator $urlGenerator; private IRootFolder $rootFolder; - private const DEFAULT_ORDER = array("/apps/snappymail/", "/apps/calendar/", "/apps/files/" , "/apps/photos/", "/apps/memories/", "/apps/contacts/", "/apps/onlyoffice/new?id=onlyoffice_docx", "/apps/onlyoffice/new?id=onlyoffice_xlsx", "/apps/onlyoffice/new?id=onlyoffice_pptx", "/apps/notes/", "/apps/tasks/", "https://spot.murena.io" , "https://murena.com" ); + private const DEFAULT_ORDER = array("/apps/snappymail/", "/apps/calendar/", "/apps/files/" , "/apps/memories/", "/apps/contacts/", "/apps/onlyoffice/new?id=onlyoffice_docx", "/apps/onlyoffice/new?id=onlyoffice_xlsx", "/apps/onlyoffice/new?id=onlyoffice_pptx", "/apps/notes/", "/apps/tasks/", "https://spot.murena.io" , "https://murena.com" ); public function __construct( $appName, IConfig $config, @@ -123,6 +123,10 @@ class AppsService { } $entriesByHref[$entry["href"]] = $entry; } + // Remove photos, replace in order correctly with memories + $order = str_replace('/apps/photos/', '/apps/memories/', $order); + $order = array_unique($order); + unset($entriesByHref['/apps/photos/']); /* Sort apps according to order Since "entriesByHref" is indexed by "href", simply reverse the order array and prepend in "entriesByHref" -- GitLab