Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/components/NewMessage/NewMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -574,14 +574,19 @@ export default {
this.errorTitle = ''
},

messageToEdit(newValue) {
if (newValue) {
messageToEdit(newValue, oldValue) {
if (newValue?.id === oldValue?.id) {
// Currently edited message was updated, keep cursor position
return
} else if (newValue) {
// Enter editing mode or editing another message
this.text = this.chatExtrasStore.getChatEditInput(this.token)
this.chatExtrasStore.removeThreadTitle(this.token)
if (this.parentMessage) {
this.chatExtrasStore.removeParentIdToReply(this.token)
}
} else {
// Leaving editing mode
this.text = this.chatInput
}

Expand Down
Loading