mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Changed sort by DocumentId wit sort by index for gift sticker fallback.
This commit is contained in:
parent
c1fa39ac05
commit
de7f983aeb
1 changed files with 5 additions and 5 deletions
|
@ -62,13 +62,13 @@ void GiftBoxPack::applySet(const MTPDmessages_stickerSet &data) {
|
||||||
const auto document = _session->data().processDocument(sticker);
|
const auto document = _session->data().processDocument(sticker);
|
||||||
if (document->sticker()) {
|
if (document->sticker()) {
|
||||||
documents.emplace(document->id, document);
|
documents.emplace(document->id, document);
|
||||||
|
if (_documents.empty()) {
|
||||||
|
// Fallback.
|
||||||
|
_documents.resize(1);
|
||||||
|
_documents[0] = document;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!documents.empty()) {
|
|
||||||
// Fallback.
|
|
||||||
_documents.resize(1);
|
|
||||||
_documents[0] = documents.begin()->second.get();
|
|
||||||
}
|
|
||||||
for (const auto &pack : data.vpacks().v) {
|
for (const auto &pack : data.vpacks().v) {
|
||||||
pack.match([&](const MTPDstickerPack &data) {
|
pack.match([&](const MTPDstickerPack &data) {
|
||||||
const auto emoji = qs(data.vemoticon());
|
const auto emoji = qs(data.vemoticon());
|
||||||
|
|
Loading…
Add table
Reference in a new issue