mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fix tabbing usernames with @
This commit is contained in:
parent
eb230494a6
commit
92bf1adf88
|
@ -100,9 +100,19 @@ void CompletionModel::refresh(const QString &prefix)
|
||||||
if (prefix.length() >= UsernameSet::PrefixLength) {
|
if (prefix.length() >= UsernameSet::PrefixLength) {
|
||||||
auto usernames = channel->accessChatters();
|
auto usernames = channel->accessChatters();
|
||||||
|
|
||||||
for (const auto &name : usernames->subrange(Prefix(prefix))) {
|
QString usernamePrefix = prefix;
|
||||||
addString(name, TaggedString::Type::Username);
|
|
||||||
addString("@" + name, TaggedString::Type::Username);
|
if (usernamePrefix.startsWith("@")) {
|
||||||
|
usernamePrefix.remove(0, 1);
|
||||||
|
for (const auto &name :
|
||||||
|
usernames->subrange(Prefix(usernamePrefix))) {
|
||||||
|
addString("@" + name, TaggedString::Type::Username);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (const auto &name :
|
||||||
|
usernames->subrange(Prefix(usernamePrefix))) {
|
||||||
|
addString(name, TaggedString::Type::Username);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue