mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
Added initial entry point for channel statistics.
This commit is contained in:
parent
ad8f8513c3
commit
b0a65885c9
3 changed files with 14 additions and 0 deletions
Telegram
|
@ -4065,6 +4065,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
"lng_stories_link_invalid" = "This link is broken or has expired.";
|
||||
|
||||
"lng_stats_title" = "Statistics";
|
||||
|
||||
// Wnd specific
|
||||
|
||||
"lng_wnd_choose_program_menu" = "Choose Default Program...";
|
||||
|
|
|
@ -62,6 +62,7 @@ enum class ChannelDataFlag {
|
|||
StoriesHidden = (1 << 26),
|
||||
HasActiveStories = (1 << 27),
|
||||
HasUnreadStories = (1 << 28),
|
||||
CanGetStatistics = (1 << 29),
|
||||
};
|
||||
inline constexpr bool is_flag_type(ChannelDataFlag) { return true; };
|
||||
using ChannelDataFlags = base::flags<ChannelDataFlag>;
|
||||
|
|
|
@ -283,6 +283,7 @@ private:
|
|||
void addSearchTopics();
|
||||
void addDeleteTopic();
|
||||
void addVideoChat();
|
||||
void addViewStatistics();
|
||||
|
||||
not_null<SessionController*> _controller;
|
||||
Dialogs::EntryState _request;
|
||||
|
@ -997,6 +998,15 @@ void Filler::addManageChat() {
|
|||
}, &st::menuIconManage);
|
||||
}
|
||||
|
||||
void Filler::addViewStatistics() {
|
||||
if (const auto channel = _peer->asChannel()) {
|
||||
if (channel->flags() & ChannelDataFlag::CanGetStatistics) {
|
||||
_addAction(tr::lng_stats_title(tr::now), [=] {
|
||||
}, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Filler::addCreatePoll() {
|
||||
const auto can = _topic
|
||||
? Data::CanSend(_topic, ChatRestriction::SendPolls)
|
||||
|
@ -1237,6 +1247,7 @@ void Filler::fillProfileActions() {
|
|||
addGiftPremium();
|
||||
addBotToGroup();
|
||||
addNewMembers();
|
||||
addViewStatistics();
|
||||
addStoryArchive();
|
||||
addManageChat();
|
||||
addTopicLink();
|
||||
|
|
Loading…
Add table
Reference in a new issue