mirror of https://github.com/procxx/kepka.git
Fix popular sticker suggestions.
Regression was introduced in ddb4527159
.
Fixes #4966.
This commit is contained in:
parent
54cd55523b
commit
06c3082fdf
|
@ -2501,6 +2501,12 @@ std::vector<not_null<DocumentData*>> *ApiWrap::stickersByEmoji(
|
||||||
auto &entry = _stickersByEmoji[emoji];
|
auto &entry = _stickersByEmoji[emoji];
|
||||||
entry.list.clear();
|
entry.list.clear();
|
||||||
entry.list.reserve(data.vstickers.v.size());
|
entry.list.reserve(data.vstickers.v.size());
|
||||||
|
for (const auto &sticker : data.vstickers.v) {
|
||||||
|
const auto document = _session->data().document(sticker);
|
||||||
|
if (document->sticker()) {
|
||||||
|
entry.list.push_back(document);
|
||||||
|
}
|
||||||
|
}
|
||||||
entry.hash = data.vhash.v;
|
entry.hash = data.vhash.v;
|
||||||
entry.received = getms(true);
|
entry.received = getms(true);
|
||||||
_session->data().notifyStickersUpdated();
|
_session->data().notifyStickersUpdated();
|
||||||
|
|
Loading…
Reference in New Issue