mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Added initial entry point for boosts statistic.
This commit is contained in:
parent
d82c422ea1
commit
8b6d475882
3 changed files with 20 additions and 5 deletions
|
@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "history/history_item.h"
|
||||
#include "info/info_controller.h"
|
||||
#include "info/info_memento.h"
|
||||
#include "info/boosts/info_boosts_widget.h"
|
||||
#include "info/statistics/info_statistics_list_controllers.h"
|
||||
#include "info/statistics/info_statistics_recent_message.h"
|
||||
#include "info/statistics/info_statistics_widget.h"
|
||||
|
@ -513,6 +514,20 @@ void InnerWidget::load() {
|
|||
descriptor.api->channelStats(),
|
||||
descriptor.api->supergroupStats(),
|
||||
};
|
||||
if (_state.stats.channel) {
|
||||
::Settings::AddSkip(inner);
|
||||
const auto button = ::Settings::AddButton(
|
||||
inner,
|
||||
tr::lng_boosts_title(),
|
||||
st::boostsButton);
|
||||
const auto controller = _controller;
|
||||
button->setClickedCallback([=, peer = descriptor.peer] {
|
||||
controller->showSection(Info::Boosts::Make(peer));
|
||||
});
|
||||
::Settings::AddSkip(inner);
|
||||
::Settings::AddDivider(inner);
|
||||
::Settings::AddSkip(inner);
|
||||
}
|
||||
fill();
|
||||
|
||||
finishLoading();
|
||||
|
|
|
@ -104,3 +104,7 @@ statisticsRecentPostButton: SettingsButton(defaultSettingsButton) {
|
|||
height: 56px;
|
||||
padding: margins(7px, 0px, 24px, 0px);
|
||||
}
|
||||
boostsButton: SettingsButton(defaultSettingsButton) {
|
||||
textFg: lightButtonFg;
|
||||
textFgOver: lightButtonFgOver;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "base/unixtime.h"
|
||||
#include "boxes/delete_messages_box.h"
|
||||
#include "boxes/max_invite_box.h"
|
||||
#include "boxes/add_contact_box.h"
|
||||
#include "boxes/choose_filter_box.h"
|
||||
#include "boxes/create_poll_box.h"
|
||||
#include "boxes/pin_messages_box.h"
|
||||
|
@ -49,7 +48,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "menu/menu_ttl_validator.h"
|
||||
#include "apiwrap.h"
|
||||
#include "mainwidget.h"
|
||||
#include "mainwindow.h"
|
||||
#include "api/api_blocked_peers.h"
|
||||
#include "api/api_chat_filters.h"
|
||||
#include "api/api_polls.h"
|
||||
|
@ -58,13 +56,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "history/history.h"
|
||||
#include "history/history_item_helpers.h" // GetErrorTextForSending.
|
||||
#include "history/view/history_view_context_menu.h"
|
||||
#include "window/window_adaptive.h" // Adaptive::isThreeColumn
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "settings/settings_advanced.h"
|
||||
#include "support/support_helper.h"
|
||||
#include "info/info_memento.h"
|
||||
#include "info/info_controller.h"
|
||||
#include "info/info_memento.h"
|
||||
#include "info/profile/info_profile_values.h"
|
||||
#include "info/statistics/info_statistics_widget.h"
|
||||
#include "info/stories/info_stories_widget.h"
|
||||
|
@ -75,7 +72,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "data/data_poll.h"
|
||||
#include "data/data_channel.h"
|
||||
#include "data/data_chat.h"
|
||||
#include "data/data_drafts.h"
|
||||
#include "data/data_forum.h"
|
||||
#include "data/data_forum_topic.h"
|
||||
#include "data/data_user.h"
|
||||
|
|
Loading…
Add table
Reference in a new issue