diff --git a/ui/app/AppLayouts/Chat/ChatColumn.qml b/ui/app/AppLayouts/Chat/ChatColumn.qml index 6d6affb9af..c9a448e573 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn.qml @@ -298,10 +298,16 @@ StackLayout { 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.text = ""; + chatInput.textInput.textFormat = TextEdit.PlainText; if(event) event.accepted = true chatInput.messageSound.stop() Qt.callLater(chatInput.messageSound.play); + + Qt.callLater(function(){ + chatInput.textInput.clear(); + chatInput.textInput.textFormat = TextEdit.RichText; + }); + } } diff --git a/ui/shared/status/StatusChatInput.qml b/ui/shared/status/StatusChatInput.qml index 5fc3261a99..5a29424cad 100644 --- a/ui/shared/status/StatusChatInput.qml +++ b/ui/shared/status/StatusChatInput.qml @@ -194,6 +194,12 @@ Rectangle { // we can only get it in the `released` event if (paste) { paste = false; + + // Remove format + const cursor = messageInputField.cursorPosition; + messageInputField.text = Emoji.parse(chatsModel.plainText(Emoji.deparse(messageInputField.text))); + messageInputField.cursorPosition = cursor; + interrogateMessage(); } @@ -207,6 +213,7 @@ Rectangle { function interrogateMessage() { const text = chatsModel.plainText(Emoji.deparse(messageInputField.text)); + var words = text.split(' '); let madeChanges = false