From cc8e432336109805f4e357015a275e37e3193005 Mon Sep 17 00:00:00 2001 From: Believethehype <1097224+believethehype@users.noreply.github.com> Date: Tue, 2 Jul 2024 11:42:10 +0200 Subject: [PATCH] make sure only owner of images get delete dialog in Gallery --- .../amethyst/ui/note/NoteQuickActionMenu.kt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteQuickActionMenu.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteQuickActionMenu.kt index aa442f935..27e7b18d9 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteQuickActionMenu.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteQuickActionMenu.kt @@ -165,12 +165,14 @@ fun LongPressToQuickActionGallery( content { popupExpanded.value = true } if (popupExpanded.value) { - NoteQuickActionMenuGallery( - note = baseNote, - onDismiss = { popupExpanded.value = false }, - accountViewModel = accountViewModel, - nav = {}, - ) + if (baseNote.author == accountViewModel.account.userProfile()) { + NoteQuickActionMenuGallery( + note = baseNote, + onDismiss = { popupExpanded.value = false }, + accountViewModel = accountViewModel, + nav = {}, + ) + } } }