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

Move export management to Core::App.

This commit is contained in:
John Preston
2020-06-25 11:14:05 +04:00
parent 28cafb129e
commit 65050bf9dd
16 changed files with 209 additions and 104 deletions

View File

@@ -37,13 +37,6 @@ namespace Main {
class Session;
} // namespace Main
namespace Export {
class Controller;
namespace View {
class PanelController;
} // namespace View
} // namespace Export
namespace Ui {
class BoxContent;
} // namespace Ui
@@ -119,15 +112,8 @@ public:
void keepAlive(std::shared_ptr<PhotoMedia> media);
void keepAlive(std::shared_ptr<DocumentMedia> media);
void startExport(PeerData *peer = nullptr);
void startExport(const MTPInputPeer &singlePeer);
void suggestStartExport(TimeId availableAt);
void clearExportSuggestion();
[[nodiscard]] auto currentExportView() const
-> rpl::producer<Export::View::PanelController*>;
bool exportInProgress() const;
void stopExportWithConfirmation(FnMut<void()> callback);
void stopExport();
[[nodiscard]] auto passportCredentials() const
-> const Passport::SavedCredentials*;
@@ -773,14 +759,11 @@ private:
void checkPollsClosings();
not_null<Main::Session*> _session;
const not_null<Main::Session*> _session;
Storage::DatabasePointer _cache;
Storage::DatabasePointer _bigFileCache;
std::unique_ptr<Export::Controller> _export;
std::unique_ptr<Export::View::PanelController> _exportPanel;
rpl::event_stream<Export::View::PanelController*> _exportViewChanges;
TimeId _exportAvailableAt = 0;
QPointer<Ui::BoxContent> _exportSuggestion;