From f78ba1295be606e8d20d891a46317bb520b334ba Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 5 Feb 2026 12:05:06 +0100 Subject: [PATCH 1/3] perf: Replace getById call with getFistNodeByid We only need the first node anyway and getFirstNodeById is quite a bit faster in many cases. Signed-off-by: Carl Schwan --- lib/Service/NotesService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Service/NotesService.php b/lib/Service/NotesService.php index 9eb955b9e..52badad06 100644 --- a/lib/Service/NotesService.php +++ b/lib/Service/NotesService.php @@ -290,12 +290,12 @@ private function getCustomExtension(string $userId) { * @throws NoteDoesNotExistException */ private static function getFileById(string $customExtension, Folder $folder, int $id) : File { - $file = $folder->getById($id); + $file = $folder->getFirstNodeById($id); - if (!array_key_exists(0, $file) || !($file[0] instanceof File) || !self::isNote($file[0], $customExtension)) { + if (!($file instanceof File) || !self::isNote($file, $customExtension)) { throw new NoteDoesNotExistException(); } - return $file[0]; + return $file; } /** From 39289866b6ffbc827c6229170597de07962899a8 Mon Sep 17 00:00:00 2001 From: "Enjeck C." Date: Thu, 23 Apr 2026 06:23:38 +0100 Subject: [PATCH 2/3] chore: Update to NC 30 Signed-off-by: Enjeck C. --- appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 1af207112..f79df383d 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -26,7 +26,7 @@ The Notes app is a distraction free notes taking app for [Nextcloud](https://www https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png - + From d24f3a6710593ccc30397e243b99532c7bf9e6fb Mon Sep 17 00:00:00 2001 From: "Enjeck C." Date: Thu, 23 Apr 2026 06:37:29 +0100 Subject: [PATCH 3/3] fix: Update to PHP 8.1 Signed-off-by: Enjeck C. --- appinfo/info.xml | 2 +- psalm.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index f79df383d..25a7e95a4 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -25,7 +25,7 @@ The Notes app is a distraction free notes taking app for [Nextcloud](https://www https://github.com/nextcloud/notes.git https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png - + diff --git a/psalm.xml b/psalm.xml index 160e85efe..83f2ebcf6 100644 --- a/psalm.xml +++ b/psalm.xml @@ -5,7 +5,7 @@ xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" errorBaseline="tests/psalm-baseline.xml" - phpVersion="8.0" + phpVersion="8.1" >