fix(StatusTagSelector): Updated names list filtering (#659)

Fixes: https://github.com/status-im/status-desktop/issues/5642
This commit is contained in:
Alexandra Betouni 2022-05-11 12:01:14 +03:00 committed by GitHub
parent a9c79b0359
commit ba79f62fda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -139,7 +139,8 @@ Item {
if (text !== "") {
for (var i = 0; i < inputModel.count; i++ ) {
var entry = inputModel.get(i);
if (entry.name.toLowerCase().includes(text.toLowerCase())) {
if (entry.name.toLowerCase().includes(text.toLowerCase()) &&
!find(namesModel, function(item) { return item.name === entry.name })) {
sortedList.append({"publicId": entry.publicId, "name": entry.name,
"icon": entry.icon, "isIdenticon": entry.isIdenticon,
"onlineStatus": entry.onlineStatus});