Skip to content

Commit c2c8427

Browse files
committed
fix: Use cached notes path to fix slow capabilities
Signed-off-by: Enjeck C. <patrathewhiz@gmail.com>
1 parent 1e25767 commit c2c8427

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/Service/NoteUtil.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,13 @@ public function getOrCreateFolder(string $path, bool $create = true) : Folder {
184184
}
185185

186186
public function getNotesFolderUserPath(string $userId): ?string {
187-
/** @psalm-suppress MissingDependency */
188-
$userFolder = $this->getRoot()->getUserFolder($userId);
189187
try {
190-
$nodesFolder = $this->getOrCreateNotesFolder($userId, false);
188+
$notesFolder = $this->settingsService->get($userId, 'notesPath');
189+
return $notesFolder;
191190
} catch (NotesFolderException $e) {
192191
$this->util->logger->debug("Failed to get notes folder for user $userId: " . $e->getMessage());
193192
return null;
194193
}
195-
return $userFolder->getRelativePath($nodesFolder->getPath());
196194
}
197195

198196
public function getOrCreateNotesFolder(string $userId, bool $create = true) : Folder {

0 commit comments

Comments
 (0)