Fix copying to clipboard edited notes
This commit is contained in:
@@ -188,8 +188,9 @@ fun NoteDropDownMenu(
|
|||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = { Text(stringRes(R.string.copy_text)) },
|
text = { Text(stringRes(R.string.copy_text)) },
|
||||||
onClick = {
|
onClick = {
|
||||||
|
val lastNoteVersion = (editState?.value as? GenericLoadable.Loaded)?.loaded?.modificationToShow?.value ?: note
|
||||||
scope.launch(Dispatchers.IO) {
|
scope.launch(Dispatchers.IO) {
|
||||||
accountViewModel.decrypt(note) { clipboardManager.setText(AnnotatedString(it)) }
|
accountViewModel.decrypt(lastNoteVersion) { clipboardManager.setText(AnnotatedString(it)) }
|
||||||
onDismiss()
|
onDismiss()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user