| 494 | } |
| 495 | |
| 496 | void 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 | |
| 522 | void ControllerObject::exportProfileMusic() { |
| 523 | _api.requestProfileMusic([=](Data::ProfileMusicInfo &&start) { |
nothing calls this directly
no test coverage detected