2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Allow single chat history export.

This commit is contained in:
John Preston
2018-07-23 16:11:56 +03:00
parent 6429e8b532
commit a99ae76ad4
22 changed files with 424 additions and 62 deletions

View File

@@ -72,12 +72,16 @@ Session::Session(not_null<AuthSession*> session)
setupChannelLeavingViewer();
}
void Session::startExport() {
void Session::startExport(PeerData *peer) {
startExport(peer ? peer->input : MTP_inputPeerEmpty());
}
void Session::startExport(const MTPInputPeer &singlePeer) {
if (_exportPanel) {
_exportPanel->activatePanel();
return;
}
_export = std::make_unique<Export::ControllerWrap>();
_export = std::make_unique<Export::ControllerWrap>(singlePeer);
_exportPanel = std::make_unique<Export::View::PanelController>(
_export.get());