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

Method reloadStickers

Telegram/SourceFiles/api/api_premium.cpp:216–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216void Premium::reloadStickers() {
217 if (_stickersRequestId) {
218 return;
219 }
220 _stickersRequestId = _api.request(MTPmessages_GetStickers(
221 MTP_string("\xe2\xad\x90\xef\xb8\x8f\xe2\xad\x90\xef\xb8\x8f"),
222 MTP_long(_stickersHash)
223 )).done([=](const MTPmessages_Stickers &result) {
224 _stickersRequestId = 0;
225 result.match([&](const MTPDmessages_stickersNotModified &) {
226 }, [&](const MTPDmessages_stickers &data) {
227 _stickersHash = data.vhash().v;
228 const auto owner = &_session->data();
229 _stickers.clear();
230 for (const auto &sticker : data.vstickers().v) {
231 const auto document = owner->processDocument(sticker);
232 if (document->isPremiumSticker()) {
233 _stickers.push_back(document);
234 }
235 }
236 _stickersUpdated.fire({});
237 });
238 }).fail([=] {
239 _stickersRequestId = 0;
240 }).send();
241}
242
243void Premium::reloadCloudSet() {
244 if (_cloudSetRequestId) {

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