mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 11:18:24 +00:00
fix(chats): replying while editing a message drops the edit's text
reply() left edit mode but kept the edited message's prefilled text, so Send posted it again as a new reply. It now cancels the edit, text included, in Marmot and in Concord (which had the same bug). Checked on the tablet: Edit a message, Reply to another, the composer is empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8d3565c124
commit
9528c81212
+3
-1
@@ -93,7 +93,9 @@ open class MarmotNewMessageViewModel : ViewModel() {
|
||||
|
||||
fun reply(note: Note) {
|
||||
replyTo.value = note
|
||||
editingMessage.value = null
|
||||
// Leaving edit mode drops the edited message's prefilled text too; kept, Send would
|
||||
// post it again as a new reply.
|
||||
if (editingMessage.value != null) cancelEdit()
|
||||
}
|
||||
|
||||
/** Enter edit mode for my own [note], prefilled with the text it currently shows. */
|
||||
|
||||
+3
-1
@@ -133,7 +133,9 @@ open class ConcordNewMessageViewModel : ViewModel() {
|
||||
fun reply(note: Note) {
|
||||
replyTo.value = note
|
||||
replyMode.value = ReplyMode.INLINE
|
||||
editingMessage.value = null
|
||||
// Leaving edit mode drops the edited message's prefilled text too; kept, Send would
|
||||
// post it again as a new reply.
|
||||
if (editingMessage.value != null) cancelEdit()
|
||||
}
|
||||
|
||||
/** Enter edit mode for my own [note]: prefills the field with its current text; sending publishes a kind-1010 edit. */
|
||||
|
||||
Reference in New Issue
Block a user