From dfe5214d5278fcc51ab4f49442d585dc8e5e88ce Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Wed, 6 Aug 2025 14:24:05 +0200 Subject: [PATCH] fix(trash): Fix order of metadata deletion First query metadata for live photo and then delete the metadata, by making the SyncLivePhotosListener priority higher than the default. Partially fix #54274 Signed-off-by: Carl Schwan --- apps/files/lib/AppInfo/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/lib/AppInfo/Application.php b/apps/files/lib/AppInfo/Application.php index 8d00912f7bba4..ca23b9f0830af 100644 --- a/apps/files/lib/AppInfo/Application.php +++ b/apps/files/lib/AppInfo/Application.php @@ -115,7 +115,7 @@ public function register(IRegistrationContext $context): void { $context->registerEventListener(RenderReferenceEvent::class, RenderReferenceEventListener::class); $context->registerEventListener(BeforeNodeRenamedEvent::class, SyncLivePhotosListener::class); $context->registerEventListener(BeforeNodeDeletedEvent::class, SyncLivePhotosListener::class); - $context->registerEventListener(CacheEntryRemovedEvent::class, SyncLivePhotosListener::class); + $context->registerEventListener(CacheEntryRemovedEvent::class, SyncLivePhotosListener::class, 1); // Ensure this happen before the metadata are deleted. $context->registerEventListener(BeforeNodeCopiedEvent::class, SyncLivePhotosListener::class); $context->registerEventListener(NodeCopiedEvent::class, SyncLivePhotosListener::class); $context->registerEventListener(LoadSearchPlugins::class, LoadSearchPluginsListener::class);