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

Method exportStories

Telegram/SourceFiles/export/export_controller.cpp:496–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

494}
495
496void ControllerObject::exportStories() {
497 _api.requestStories([=](Data::StoriesInfo &&start) {
498 if (ioCatchError(_writer->writeStoriesStart(start))) {
499 return false;
500 }
501 _storiesWritten = 0;
502 _storiesCount = start.count;
503 return true;
504 }, [=](DownloadProgress progress) {
505 setState(stateStories(progress));
506 return true;
507 }, [=](Data::StoriesSlice &&slice) {
508 if (ioCatchError(_writer->writeStoriesSlice(slice))) {
509 return false;
510 }
511 _storiesWritten += slice.list.size();
512 setState(stateStories(DownloadProgress()));
513 return true;
514 }, [=] {
515 if (ioCatchError(_writer->writeStoriesEnd())) {
516 return;
517 }
518 exportNext();
519 });
520}
521
522void ControllerObject::exportProfileMusic() {
523 _api.requestProfileMusic([=](Data::ProfileMusicInfo &&start) {

Callers

nothing calls this directly

Calls 6

requestStoriesMethod · 0.80
DownloadProgressClass · 0.70
writeStoriesStartMethod · 0.45
writeStoriesSliceMethod · 0.45
sizeMethod · 0.45
writeStoriesEndMethod · 0.45

Tested by

no test coverage detected