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 ef758e62a..973406933 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 @@ -188,8 +188,9 @@ fun NoteDropDownMenu( DropdownMenuItem( text = { Text(stringRes(R.string.copy_text)) }, onClick = { + val lastNoteVersion = (editState?.value as? GenericLoadable.Loaded)?.loaded?.modificationToShow?.value ?: note scope.launch(Dispatchers.IO) { - accountViewModel.decrypt(note) { clipboardManager.setText(AnnotatedString(it)) } + accountViewModel.decrypt(lastNoteVersion) { clipboardManager.setText(AnnotatedString(it)) } onDismiss() } },