From 7beff8c835b884ec64008ada956f0213d98271ab Mon Sep 17 00:00:00 2001 From: David Kaspar Date: Wed, 6 Nov 2024 18:53:01 +0000 Subject: [PATCH] Add unfollow to NoteDropDownMenu --- .../amethyst/ui/note/elements/DropDownMenu.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/elements/DropDownMenu.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/elements/DropDownMenu.kt index accda0ccd..3ff40bfbc 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/elements/DropDownMenu.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/elements/DropDownMenu.kt @@ -169,6 +169,16 @@ fun NoteDropDownMenu( }, ) HorizontalDivider(thickness = DividerThickness) + } else { + DropdownMenuItem( + text = { Text(stringRes(R.string.unfollow)) }, + onClick = { + val author = note.author ?: return@DropdownMenuItem + accountViewModel.unfollow(author) + onDismiss() + }, + ) + HorizontalDivider(thickness = DividerThickness) } DropdownMenuItem( text = { Text(stringRes(R.string.copy_text)) },