diff --git a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp index 1f27d52cd..7bb8c85dd 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp @@ -984,8 +984,10 @@ void ManageFiller::addChannelRecentActions( tr::lng_manage_peer_recent_actions(), rpl::single(true), [=] { - controller->showSection( - std::make_shared(channel)); + if (!App::main()->areRecentActionsOpened()) { + controller->showSection( + std::make_shared(channel)); + } }); object_ptr( button, diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 54d570bce..94f20ba0a 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -61,6 +61,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "history/history.h" #include "history/history_widget.h" #include "history/history_message.h" +#include "history/admin_log/history_admin_log_section.h" #include "history/view/media/history_view_media.h" #include "history/view/history_view_service_message.h" #include "history/view/history_view_element.h" @@ -1941,6 +1942,11 @@ bool MainWidget::preventsCloseSection( : preventsCloseSection(std::move(callback)); } +bool MainWidget::areRecentActionsOpened() { + return _mainSection + && static_cast(_mainSection.data()); +} + void MainWidget::showBackFromStack( const SectionShow ¶ms) { diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index 87ca393ae..df9ef6950 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -241,6 +241,8 @@ public: Fn callback, const SectionShow ¶ms) const; + bool areRecentActionsOpened(); + public Q_SLOTS: void inlineResultLoadProgress(FileLoader *loader); void inlineResultLoadFailed(FileLoader *loader, bool started);