mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Improved processing of access to boosts info.
This commit is contained in:
parent
88b20f6700
commit
cccc2ce0f1
1 changed files with 6 additions and 2 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue