diff --git a/Telegram/SourceFiles/window/window_peer_menu.cpp b/Telegram/SourceFiles/window/window_peer_menu.cpp index 77213a5c6..fddb1379d 100644 --- a/Telegram/SourceFiles/window/window_peer_menu.cpp +++ b/Telegram/SourceFiles/window/window_peer_menu.cpp @@ -1005,7 +1005,9 @@ void Filler::addViewStatistics() { const auto controller = _controller; const auto weak = base::make_weak(_thread); const auto peer = _peer; - if (channel->flags() & ChannelDataFlag::CanGetStatistics) { + using Flag = ChannelDataFlag; + const auto canGetStats = (channel->flags() & Flag::CanGetStatistics); + if (canGetStats) { _addAction(tr::lng_stats_title(tr::now), [=] { if (const auto strong = weak.get()) { using namespace Info; @@ -1014,7 +1016,9 @@ void Filler::addViewStatistics() { }, &st::menuIconStats); } if (!channel->isMegagroup() - && (channel->amCreator() || channel->canPostStories())) { + && (canGetStats + || channel->amCreator() + || channel->canPostStories())) { _addAction(tr::lng_boosts_title(tr::now), [=] { if (const auto strong = weak.get()) { controller->showSection(Info::Boosts::Make(peer));