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

Method reloadCloudSet

Telegram/SourceFiles/api/api_premium.cpp:243–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void Premium::reloadCloudSet() {
244 if (_cloudSetRequestId) {
245 return;
246 }
247 _cloudSetRequestId = _api.request(MTPmessages_GetStickers(
248 MTP_string("\xf0\x9f\x93\x82\xe2\xad\x90\xef\xb8\x8f"),
249 MTP_long(_cloudSetHash)
250 )).done([=](const MTPmessages_Stickers &result) {
251 _cloudSetRequestId = 0;
252 result.match([&](const MTPDmessages_stickersNotModified &) {
253 }, [&](const MTPDmessages_stickers &data) {
254 _cloudSetHash = data.vhash().v;
255 const auto owner = &_session->data();
256 _cloudSet.clear();
257 for (const auto &sticker : data.vstickers().v) {
258 const auto document = owner->processDocument(sticker);
259 if (document->isPremiumSticker()) {
260 _cloudSet.push_back(document);
261 }
262 }
263 _cloudSetUpdated.fire({});
264 });
265 }).fail([=] {
266 _cloudSetRequestId = 0;
267 }).send();
268}
269
270void Premium::reloadHelloStickers() {
271 if (_helloStickersRequestId) {

Callers

nothing calls this directly

Calls 11

MTP_stringFunction · 0.85
MTP_longFunction · 0.85
processDocumentMethod · 0.80
isPremiumStickerMethod · 0.80
sendMethod · 0.45
failMethod · 0.45
doneMethod · 0.45
requestMethod · 0.45
dataMethod · 0.45
clearMethod · 0.45
fireMethod · 0.45

Tested by

no test coverage detected