diff --git a/ui/app/AppLayouts/Chat/ChatColumn.qml b/ui/app/AppLayouts/Chat/ChatColumn.qml index 83d939cff4..bdbd24a308 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn.qml @@ -311,20 +311,18 @@ StackLayout { if (chatInput.fileUrls.length > 0){ chatsModel.sendImage(chatInput.fileUrls[0], false); } - var msg = chatsModel.plainText(Emoji.deparse(chatInput.textInput.text)) + let msg = chatsModel.plainText(Emoji.deparse(chatInput.textInput.text)) if (msg.length > 0){ msg = chatInput.interpretMessage(msg) chatsModel.sendMessage(msg, chatInput.isReply ? SelectedMessage.messageId : "", Utils.isOnlyEmoji(msg) ? Constants.emojiType : Constants.messageType, false); - chatInput.textInput.textFormat = TextEdit.PlainText; - if(event) event.accepted = true + + if (event) event.accepted = true chatInput.messageSound.stop() Qt.callLater(chatInput.messageSound.play); - Qt.callLater(function(){ - chatInput.textInput.clear(); - chatInput.textInput.textFormat = TextEdit.RichText; - }); - + chatInput.textInput.clear(); + chatInput.textInput.textFormat = TextEdit.PlainText; + chatInput.textInput.textFormat = TextEdit.RichText; } }