diff --git a/Telegram/SourceFiles/window/window_controller.cpp b/Telegram/SourceFiles/window/window_controller.cpp index bd23b329ae..f9d352f642 100644 --- a/Telegram/SourceFiles/window/window_controller.cpp +++ b/Telegram/SourceFiles/window/window_controller.cpp @@ -277,6 +277,13 @@ void Controller::showToast(const QString &text) { Ui::Toast::Show(_widget.bodyWidget(), text); } +void Controller::showLayer( + std::unique_ptr &&layer, + Ui::LayerOptions options, + anim::type animated) { + _widget.showLayer(std::move(layer), options, animated); +} + void Controller::showBox( object_ptr content, Ui::LayerOptions options, diff --git a/Telegram/SourceFiles/window/window_controller.h b/Telegram/SourceFiles/window/window_controller.h index 1b20e7e0ab..f58dc8e770 100644 --- a/Telegram/SourceFiles/window/window_controller.h +++ b/Telegram/SourceFiles/window/window_controller.h @@ -69,6 +69,10 @@ public: return result; } void showToast(const QString &text); + void showLayer( + std::unique_ptr &&layer, + Ui::LayerOptions options, + anim::type animated = anim::type::normal); void showRightColumn(object_ptr widget); void sideBarChanged(); diff --git a/Telegram/SourceFiles/window/window_session_controller.cpp b/Telegram/SourceFiles/window/window_session_controller.cpp index 8a24b2ce74..6f256c8b4c 100644 --- a/Telegram/SourceFiles/window/window_session_controller.cpp +++ b/Telegram/SourceFiles/window/window_session_controller.cpp @@ -1206,7 +1206,7 @@ void SessionController::showLayer( std::unique_ptr &&layer, Ui::LayerOptions options, anim::type animated) { - widget()->showLayer(std::move(layer), options, animated); + _window->showLayer(std::move(layer), options, animated); } void SessionController::removeLayerBlackout() {