2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Move discussion group link to three-dot menu.

This commit is contained in:
John Preston
2020-09-03 15:53:54 +04:00
parent 60002555c3
commit d42ce87c09
12 changed files with 95 additions and 208 deletions

View File

@@ -547,13 +547,21 @@ void Filler::addChannelActions(not_null<ChannelData*> channel) {
// }
//}
if (_source != PeerMenuSource::ChatsList) {
if (channel->isBroadcast()) {
if (const auto chat = channel->linkedChat()) {
_addAction(tr::lng_profile_view_discussion(tr::now), [=] {
navigation->showPeerHistory(
chat,
Window::SectionShow::Way::Forward);
});
}
}
if (EditPeerInfoBox::Available(channel)) {
const auto controller = _controller;
const auto text = isGroup
? tr::lng_manage_group_title(tr::now)
: tr::lng_manage_channel_title(tr::now);
_addAction(text, [=] {
controller->showEditPeerBox(channel);
navigation->showEditPeerBox(channel);
});
}
if (channel->canAddMembers()) {