MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / updateGeneric

Method updateGeneric

Telegram/SourceFiles/data/data_message_reactions.cpp:1164–1182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1162}
1163
1164void 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
1184void Reactions::updateMyTags(
1185 SavedSublist *sublist,

Callers

nothing calls this directly

Calls 9

emplaceMethod · 0.80
processDocumentMethod · 0.80
checkStickerLargeMethod · 0.80
frontMethod · 0.80
stickerMethod · 0.45
createMediaViewMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected