fix(StatusChatInput): return correct mention suggestions
- follow the order of properties that `ProfileUtils.displayName()` uses elsewhere in the application - prefer nickname or ensName over displayName if the user has them Fixes: #8691
This commit is contained in:
parent
785110b410
commit
db97fbf3eb
|
@ -990,11 +990,11 @@ Rectangle {
|
|||
width: messageInput.width
|
||||
filter: messageInputField.text
|
||||
cursorPosition: messageInputField.cursorPosition
|
||||
property: ["name", "nickname", "ensName", "alias"]
|
||||
property: ["nickname", "ensName", "name", "alias"]
|
||||
inputField: messageInputField
|
||||
onItemSelected: function (item, lastAtPosition, lastCursorPosition) {
|
||||
messageInputField.forceActiveFocus();
|
||||
let name = item.name.replace("@", "")
|
||||
const name = item[suggestionsBox.property.find(p => !!item[p])].replace("@", "")
|
||||
d.insertMention(name, item.publicKey, lastAtPosition, lastCursorPosition)
|
||||
suggestionsBox.suggestionsModel.clear()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue