Removed mutable lambdas from export controller.

This commit is contained in:
23rd 2022-02-27 12:21:21 +03:00
parent bb78c43de5
commit 2d36079999
4 changed files with 4 additions and 4 deletions

View file

@ -67,7 +67,7 @@ bool Manager::inProgress(not_null<Main::Session*> session) const {
return _panel && (&_panel->session() == session); return _panel && (&_panel->session() == session);
} }
void Manager::stopWithConfirmation(FnMut<void()> callback) { void Manager::stopWithConfirmation(Fn<void()> callback) {
if (!_panel) { if (!_panel) {
callback(); callback();
return; return;

View file

@ -38,7 +38,7 @@ public:
[[nodiscard]] rpl::producer<View::PanelController*> currentView() const; [[nodiscard]] rpl::producer<View::PanelController*> currentView() const;
[[nodiscard]] bool inProgress() const; [[nodiscard]] bool inProgress() const;
[[nodiscard]] bool inProgress(not_null<Main::Session*> session) const; [[nodiscard]] bool inProgress(not_null<Main::Session*> session) const;
void stopWithConfirmation(FnMut<void()> callback); void stopWithConfirmation(Fn<void()> callback);
void stop(); void stop();
private: private:

View file

@ -329,7 +329,7 @@ void PanelController::showProgress() {
_panel->setHideOnDeactivate(true); _panel->setHideOnDeactivate(true);
} }
void PanelController::stopWithConfirmation(FnMut<void()> callback) { void PanelController::stopWithConfirmation(Fn<void()> callback) {
if (!v::is<ProcessingState>(_state)) { if (!v::is<ProcessingState>(_state)) {
LOG(("Export Info: Stop Panel Without Confirmation.")); LOG(("Export Info: Stop Panel Without Confirmation."));
stopExport(); stopExport();

View file

@ -43,7 +43,7 @@ public:
} }
void activatePanel(); void activatePanel();
void stopWithConfirmation(FnMut<void()> callback = nullptr); void stopWithConfirmation(Fn<void()> callback = nullptr);
[[nodiscard]] rpl::producer<> stopRequests() const; [[nodiscard]] rpl::producer<> stopRequests() const;