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

Method requestUserpicsCount

Telegram/SourceFiles/export/export_api_wrap.cpp:517–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515}
516
517void ApiWrap::requestUserpicsCount() {
518 Expects(_startProcess != nullptr);
519
520 mainRequest(MTPphotos_GetUserPhotos(
521 _user,
522 MTP_int(0), // offset
523 MTP_long(0), // max_id
524 MTP_int(0) // limit
525 )).done([=](const MTPphotos_Photos &result) {
526 Expects(_settings != nullptr);
527 Expects(_startProcess != nullptr);
528
529 _startProcess->info.userpicsCount = result.match(
530 [](const MTPDphotos_photos &data) {
531 return int(data.vphotos().v.size());
532 }, [](const MTPDphotos_photosSlice &data) {
533 return data.vcount().v;
534 });
535
536 sendNextStartRequest();
537 }).send();
538}
539
540void ApiWrap::requestStoriesCount() {
541 Expects(_startProcess != nullptr);

Callers

nothing calls this directly

Calls 5

MTP_longFunction · 0.85
MTP_intFunction · 0.50
sendMethod · 0.45
doneMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected