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

Added manage channel button to profile section of owned channels.

This commit is contained in:
23rd
2024-10-04 09:30:03 +03:00
parent 3cb0be5be5
commit a74c5a89a6
2 changed files with 16 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/peers/add_bot_to_chat_box.h"
#include "boxes/peers/edit_contact_box.h"
#include "boxes/peers/edit_participants_box.h"
#include "boxes/peers/edit_peer_info_box.h"
#include "boxes/report_messages_box.h"
#include "boxes/share_box.h"
#include "boxes/star_gift_box.h"
@@ -2340,6 +2341,20 @@ object_ptr<Ui::RpWidget> SetupChannelMembersAndManage(
st::menuIconAdmin,
st::infoChannelAdminsIconPosition);
if (EditPeerInfoBox::Available(channel)) {
const auto sessionController = controller->parentController();
const auto button = AddActionButton(
result->entity(),
tr::lng_profile_manage(),
rpl::single(true),
[=] { sessionController->showEditPeerBox(channel); },
nullptr);
object_ptr<FloatingIcon>(
button,
st::menuIconManage,
st::infoChannelAdminsIconPosition);
}
result->setDuration(st::infoSlideDuration)->toggleOn(
rpl::combine(
std::move(membersShown),