| 1162 | } |
| 1163 | |
| 1164 | void Reactions::updateGeneric(const MTPDmessages_stickerSet &data) { |
| 1165 | const auto oldCache = base::take(_genericCache); |
| 1166 | const auto toCache = [&](not_null<DocumentData*> document) { |
| 1167 | if (document->sticker()) { |
| 1168 | _genericAnimations.push_back(document); |
| 1169 | _genericCache.emplace(document, document->createMediaView()); |
| 1170 | } |
| 1171 | }; |
| 1172 | const auto &list = data.vdocuments().v; |
| 1173 | _genericAnimations.clear(); |
| 1174 | _genericAnimations.reserve(list.size()); |
| 1175 | _genericCache.reserve(list.size()); |
| 1176 | for (const auto &sticker : data.vdocuments().v) { |
| 1177 | toCache(_owner->processDocument(sticker)); |
| 1178 | } |
| 1179 | if (!_genericCache.empty()) { |
| 1180 | _genericCache.front().second->checkStickerLarge(); |
| 1181 | } |
| 1182 | } |
| 1183 | |
| 1184 | void Reactions::updateMyTags( |
| 1185 | SavedSublist *sublist, |
nothing calls this directly
no test coverage detected