Merge pull request #997 from VASHvic/fix-clipboard-copy-edited-notes

Fix copying to clipboard edited notes
This commit is contained in:
Vitor Pamplona
2024-07-30 13:47:49 -04:00
committed by GitHub
@@ -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()
}
},