2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Featured stickers fully supported (unread badges, box, adding, etc).

This commit is contained in:
John Preston
2016-06-28 21:05:38 +03:00
parent 991c6ddd99
commit cd696ade4e
24 changed files with 656 additions and 304 deletions

View File

@@ -196,14 +196,14 @@ void FieldAutocomplete::updateFiltered(bool resetScroll) {
}
return true;
};
auto filterNotPassedByName = [this](UserData *user) -> bool {
auto filterNotPassedByName = [this, &filterNotPassedByUsername](UserData *user) -> bool {
for_const (auto &namePart, user->names) {
if (namePart.startsWith(_filter, Qt::CaseInsensitive)) {
bool exactUsername = (user->username.compare(_filter, Qt::CaseInsensitive) == 0);
return exactUsername;
}
}
return true;
return filterNotPassedByUsername(user);
};
bool listAllSuggestions = _filter.isEmpty();