fix: code review - 2

This commit is contained in:
Richard Ramos 2021-02-08 13:27:24 -04:00 committed by Iuri Matias
parent 7178ae5910
commit 9d9f51c080
1 changed files with 3 additions and 3 deletions

View File

@ -194,9 +194,9 @@ Rectangle {
// we can only get it in the `released` event
if (paste) {
paste = false;
// Remove format
messageInputField.text = Emoji.parse(chatsModel.plainText(Emoji.deparse(messageInputField.text)).replaceAll("\n","<br />"))
const deparsedEmoji = Emoji.deparse(messageInputField.text);
const plainText = chatsModel.plainText(deparsedEmoji);
messageInputField.text = Emoji.parse(plainText.replace(/\n/g, "<br />"));
messageInputField.cursorPosition = messageInputField.length;
interrogateMessage();