mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 15:17:07 +02:00
Moved entry point for boosts statistic to channel context menu.
This commit is contained in:
parent
f2fa1cd70d
commit
be38800a70
6 changed files with 9 additions and 15 deletions
Telegram
Resources/icons/menu
SourceFiles
BIN
Telegram/Resources/icons/menu/boosts.png
Normal file
BIN
Telegram/Resources/icons/menu/boosts.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 589 B |
BIN
Telegram/Resources/icons/menu/boosts@2x.png
Normal file
BIN
Telegram/Resources/icons/menu/boosts@2x.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 1.1 KiB |
BIN
Telegram/Resources/icons/menu/boosts@3x.png
Normal file
BIN
Telegram/Resources/icons/menu/boosts@3x.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 1.7 KiB |
|
@ -14,7 +14,6 @@ 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"
|
||||
|
@ -514,20 +513,6 @@ 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();
|
||||
|
|
|
@ -52,6 +52,7 @@ menuIconClear: icon {{ "menu/clear", menuIconColor }};
|
|||
menuIconManage: icon {{ "menu/manage", menuIconColor }};
|
||||
menuIconDiscussion: icon {{ "menu/discussion", menuIconColor }};
|
||||
menuIconStats: icon {{ "menu/stats", menuIconColor }};
|
||||
menuIconBoosts: icon {{ "menu/boosts", menuIconColor }};
|
||||
menuIconCreatePoll: icon {{ "menu/create_poll", menuIconColor }};
|
||||
menuIconQrCode: icon {{ "menu/qr_code", menuIconColor }};
|
||||
menuIconExpand: icon {{ "menu/expand", menuIconColor }};
|
||||
|
|
|
@ -62,6 +62,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "support/support_helper.h"
|
||||
#include "info/info_controller.h"
|
||||
#include "info/info_memento.h"
|
||||
#include "info/boosts/info_boosts_widget.h"
|
||||
#include "info/profile/info_profile_values.h"
|
||||
#include "info/statistics/info_statistics_widget.h"
|
||||
#include "info/stories/info_stories_widget.h"
|
||||
|
@ -1006,6 +1007,13 @@ void Filler::addViewStatistics() {
|
|||
controller->showSection(Info::Statistics::Make(peer, {}));
|
||||
}
|
||||
}, &st::menuIconStats);
|
||||
if (!channel->isMegagroup()) {
|
||||
_addAction(tr::lng_boosts_title(tr::now), [=] {
|
||||
if (const auto strong = weak.get()) {
|
||||
controller->showSection(Info::Boosts::Make(peer));
|
||||
}
|
||||
}, &st::menuIconBoosts);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue