From 9fef97c9ec1ec1fea4fc5dd4d17a3ba84b6e3884 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 32c072ef0f412..2761b44ecf9d4 100644 --- a/apps/files/lib/AppInfo/Application.php +++ b/apps/files/lib/AppInfo/Application.php @@ -117,7 +117,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);