Skip to content

Commit

Permalink
Fix copying to clipboard edited notes
Browse files Browse the repository at this point in the history
  • Loading branch information
VASHvic committed Jul 27, 2024
1 parent b440661 commit 25823b1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
},
Expand Down

0 comments on commit 25823b1

Please sign in to comment.