We now also add localized names to the autocompletion

Changed the login name in autocompletion to the display name
Autocompletion model is now only updated on the "first completion"
This commit is contained in:
Rasmus Karlsson
2017-12-17 21:05:25 +01:00
parent 6f1509cb4f
commit 03958420be
9 changed files with 45 additions and 28 deletions
+9 -3
View File
@@ -65,9 +65,15 @@ void CompletionModel::refresh()
return;
}
auto usernames = c->getUsernamesForCompletions();
for (const auto &username : usernames) {
this->addString(username);
this->addString('@' + username);
for (const auto &name : usernames) {
assert(!name.displayName.isEmpty());
this->addString(name.displayName);
this->addString('@' + name.displayName);
if (!name.localizedName.isEmpty()) {
this->addString(name.localizedName);
this->addString('@' + name.localizedName);
}
}
}