fix(edit): fix edit message not sending mentions correctly
Fixes #10074
This commit is contained in:
parent
14c264e350
commit
0424715810
|
@ -59,7 +59,15 @@ Item {
|
||||||
size: StatusBaseButton.Size.Small
|
size: StatusBaseButton.Size.Small
|
||||||
enabled: !!chatInputLoader.item && chatInputLoader.item.messageText.trim().length > 0
|
enabled: !!chatInputLoader.item && chatInputLoader.item.messageText.trim().length > 0
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editCompleted(!chatInputLoader.item ? "" : chatInputLoader.item.messageText)
|
let text = ""
|
||||||
|
if (chatInputLoader.item) {
|
||||||
|
if (chatInputLoader.item.getTextWithPublicKeys) {
|
||||||
|
text = chatInputLoader.item.getTextWithPublicKeys()
|
||||||
|
} else {
|
||||||
|
text = chatInputLoader.item.messageText
|
||||||
|
}
|
||||||
|
}
|
||||||
|
editCompleted(text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -479,9 +479,7 @@ Loader {
|
||||||
delegate.editCancelledHandler()
|
delegate.editCancelledHandler()
|
||||||
}
|
}
|
||||||
|
|
||||||
onEditCompleted: {
|
onEditCompleted: delegate.editCompletedHandler(newMsgText)
|
||||||
delegate.editCompletedHandler(newMsgText)
|
|
||||||
}
|
|
||||||
|
|
||||||
onImageClicked: {
|
onImageClicked: {
|
||||||
switch (mouse.button) {
|
switch (mouse.button) {
|
||||||
|
@ -679,9 +677,7 @@ Loader {
|
||||||
chatType: root.messageStore.chatType
|
chatType: root.messageStore.chatType
|
||||||
isEdit: true
|
isEdit: true
|
||||||
|
|
||||||
onSendMessage: {
|
onSendMessage: delegate.editCompletedHandler(editTextInput.getTextWithPublicKeys())
|
||||||
delegate.editCompletedHandler(editTextInput.textInput.text)
|
|
||||||
}
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
parseMessage(root.messageText);
|
parseMessage(root.messageText);
|
||||||
|
|
Loading…
Reference in New Issue