| 214 | } |
| 215 | |
| 216 | void 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 | |
| 243 | void Premium::reloadCloudSet() { |
| 244 | if (_cloudSetRequestId) { |
nothing calls this directly
no test coverage detected