diff --git a/Telegram/SourceFiles/boxes/about_box.cpp b/Telegram/SourceFiles/boxes/about_box.cpp index 6df67f6ef4..93015c97a5 100644 --- a/Telegram/SourceFiles/boxes/about_box.cpp +++ b/Telegram/SourceFiles/boxes/about_box.cpp @@ -25,6 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include +#include "window/window_controller.h" #include "window/window_session_controller.h" #include "window/window_session_controller_link_info.h" @@ -46,7 +47,7 @@ rpl::producer Text() { } // namespace -AboutBox::AboutBox(QWidget *parent, not_null controller) +AboutBox::AboutBox(QWidget *parent, Window::SessionController* controller) : _version(this, tr::lng_about_version(tr::now, lt_version, currentVersionText()), st::aboutVersionLink) , _text(this, Text(), st::aboutLabel) , _controller(controller) { @@ -58,12 +59,12 @@ void AboutBox::prepare() { addButton(tr::lng_close(), [this] { closeBox(); }); addLeftButton( rpl::single(QString("@ayugramchat")), - [=] + [this, controller = _controller] { - _controller->showPeerByLink(Window::PeerByLinkInfo{ + closeBox(); + controller->showPeerByLink(Window::PeerByLinkInfo{ .usernameOrId = QString("ayugramchat"), }); - closeBox(); }); _text->setLinksTrusted(); diff --git a/Telegram/SourceFiles/boxes/about_box.h b/Telegram/SourceFiles/boxes/about_box.h index 16de993393..0748f3f9bb 100644 --- a/Telegram/SourceFiles/boxes/about_box.h +++ b/Telegram/SourceFiles/boxes/about_box.h @@ -20,7 +20,7 @@ class FlatLabel; class AboutBox : public Ui::BoxContent { public: - AboutBox(QWidget*, not_null controller); + AboutBox(QWidget*, Window::SessionController* controller); protected: void prepare() override; @@ -33,7 +33,7 @@ private: object_ptr _version; object_ptr _text; - not_null _controller; + Window::SessionController* _controller; };