Fix inclusion condition for overriden pack types

This commit is contained in:
Nicolas Werner 2021-12-27 06:40:47 +01:00
parent ea6b19b307
commit 0897e4c062
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 1 additions and 3 deletions

View file

@ -3591,7 +3591,7 @@ Cache::getImagePacks(const std::string &room_id, std::optional<bool> stickers)
for (const auto &img : pack.images) { for (const auto &img : pack.images) {
if (stickers.has_value() && if (stickers.has_value() &&
(img.second.overrides_usage() (img.second.overrides_usage()
? (!stickers.value() ? img.second.is_sticker() : img.second.is_emoji()) ? (stickers.value() ? !img.second.is_sticker() : !img.second.is_emoji())
: !pack_matches)) : !pack_matches))
continue; continue;

View file

@ -71,8 +71,6 @@ CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model,
&CompletionProxyModel::newSearchString, &CompletionProxyModel::newSearchString,
this, this,
[this](QString s) { [this](QString s) {
s.remove(":");
s.remove("@");
searchString_ = s.toLower(); searchString_ = s.toLower();
invalidate(); invalidate();
}, },