diff options
author | Robin Appelman <robin@icewind.nl> | 2024-02-09 09:54:52 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2024-03-04 13:57:31 +0100 |
commit | e7a7b4a40184dc3da2c83e858c820625f660e48e (patch) | |
tree | 367bda0ac814376e7c771fbe4b1c40cf7f33df53 /apps/files/lib/Listener | |
parent | 4d110c1dd6ae384c00c93b4e266118004b71e498 (diff) | |
download | nextcloud-server-e7a7b4a40184dc3da2c83e858c820625f660e48e.tar.gz nextcloud-server-e7a7b4a40184dc3da2c83e858c820625f660e48e.zip |
perf: switch places that always use the first getById result to getFirstNodeById
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files/lib/Listener')
-rw-r--r-- | apps/files/lib/Listener/SyncLivePhotosListener.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/lib/Listener/SyncLivePhotosListener.php b/apps/files/lib/Listener/SyncLivePhotosListener.php index b188ad24073..ea63c08f94d 100644 --- a/apps/files/lib/Listener/SyncLivePhotosListener.php +++ b/apps/files/lib/Listener/SyncLivePhotosListener.php @@ -233,9 +233,9 @@ class SyncLivePhotosListener implements IEventListener { $peerFileId = (int)$metadata->getString('files-live-photo'); // Check the user's folder. - $nodes = $this->userFolder->getById($peerFileId); - if (count($nodes) !== 0) { - return $nodes[0]; + $node = $this->userFolder->getFirstNodeById($peerFileId); + if ($node) { + return $node; } // Check the user's trashbin. |