From 58e95849841144fead91385796e2438a6ea87177 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Mon, 8 Feb 2021 13:51:31 -0400 Subject: [PATCH] fix: make mentions with nicknames work the same as mobile --- ui/shared/status/StatusChatInput.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/shared/status/StatusChatInput.qml b/ui/shared/status/StatusChatInput.qml index 690d6aee7f..76e2715bcc 100644 --- a/ui/shared/status/StatusChatInput.qml +++ b/ui/shared/status/StatusChatInput.qml @@ -446,12 +446,13 @@ Rectangle { chatsModel.plainText(Emoji.deparse(messageInputField.text)) : chatsModel.plainText(messageInputField.text); - let aliasName = item[suggestionsBox.property.split(",").map(p => p.trim()).find(p => !!item[p])] + var properties = "ensName, alias"; // Ignore localNickname + + let aliasName = item[properties.split(",").map(p => p.trim()).find(p => !!item[p])] aliasName = aliasName.replace(/(\.stateofus)?\.eth/, "") let nameLen = aliasName.length + 2 // We're doing a +2 here because of the `@` and the trailing whitespace let position = 0; let text = "" - if (currentText === "@") { position = nameLen text = "@" + aliasName + " "