diff --git a/Telegram/SourceFiles/chat_helpers/stickers.cpp b/Telegram/SourceFiles/chat_helpers/stickers.cpp index 1f153972d..6d54e4139 100644 --- a/Telegram/SourceFiles/chat_helpers/stickers.cpp +++ b/Telegram/SourceFiles/chat_helpers/stickers.cpp @@ -465,20 +465,23 @@ void SpecialSetReceived( auto dates = std::vector(); auto dateIndex = 0; - auto datesAvailable = (items.size() == usageDates.size()); + auto datesAvailable = (items.size() == usageDates.size()) + && (setId == CloudRecentSetId); auto custom = sets.find(CustomSetId); auto pack = Pack(); pack.reserve(items.size()); for_const (auto &mtpDocument, items) { - const auto date = datesAvailable - ? TimeId(usageDates[dateIndex++].v) - : TimeId(); + ++dateIndex; auto document = Auth().data().document(mtpDocument); - if (!document->sticker()) continue; + if (!document->sticker()) { + continue; + } pack.push_back(document); - dates.push_back(date); + if (datesAvailable) { + dates.push_back(TimeId(usageDates[dateIndex - 1].v)); + } if (custom != sets.cend()) { auto index = custom->stickers.indexOf(document); if (index >= 0) { diff --git a/Telegram/SourceFiles/storage/localstorage.cpp b/Telegram/SourceFiles/storage/localstorage.cpp index 47c1066c6..24ca577a9 100644 --- a/Telegram/SourceFiles/storage/localstorage.cpp +++ b/Telegram/SourceFiles/storage/localstorage.cpp @@ -3458,7 +3458,9 @@ void _readStickerSets(FileKey &stickersKey, Stickers::Order *outOrder = nullptr, for (auto i = 0; i != datesCount; ++i) { auto date = qint32(); stickers.stream >> date; - set.dates.push_back(TimeId(date)); + if (set.id == Stickers::CloudRecentSetId) { + set.dates.push_back(TimeId(date)); + } } } }