mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
Added manage channel button to profile section of owned channels.
This commit is contained in:
@@ -1381,6 +1381,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
"lng_profile_public_photo" = "public photo";
|
"lng_profile_public_photo" = "public photo";
|
||||||
"lng_profile_administrators#one" = "{count} administrator";
|
"lng_profile_administrators#one" = "{count} administrator";
|
||||||
"lng_profile_administrators#other" = "{count} administrators";
|
"lng_profile_administrators#other" = "{count} administrators";
|
||||||
|
"lng_profile_manage" = "Channel settings";
|
||||||
|
|
||||||
"lng_invite_upgrade_title" = "Upgrade to Premium";
|
"lng_invite_upgrade_title" = "Upgrade to Premium";
|
||||||
"lng_invite_upgrade_group_invite#one" = "{users} only accepts invitations to groups from Contacts and **Premium** users.";
|
"lng_invite_upgrade_group_invite#one" = "{users} only accepts invitations to groups from Contacts and **Premium** users.";
|
||||||
|
@@ -17,6 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
#include "boxes/peers/add_bot_to_chat_box.h"
|
#include "boxes/peers/add_bot_to_chat_box.h"
|
||||||
#include "boxes/peers/edit_contact_box.h"
|
#include "boxes/peers/edit_contact_box.h"
|
||||||
#include "boxes/peers/edit_participants_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/report_messages_box.h"
|
||||||
#include "boxes/share_box.h"
|
#include "boxes/share_box.h"
|
||||||
#include "boxes/star_gift_box.h"
|
#include "boxes/star_gift_box.h"
|
||||||
@@ -2340,6 +2341,20 @@ object_ptr<Ui::RpWidget> SetupChannelMembersAndManage(
|
|||||||
st::menuIconAdmin,
|
st::menuIconAdmin,
|
||||||
st::infoChannelAdminsIconPosition);
|
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(
|
result->setDuration(st::infoSlideDuration)->toggleOn(
|
||||||
rpl::combine(
|
rpl::combine(
|
||||||
std::move(membersShown),
|
std::move(membersShown),
|
||||||
|
Reference in New Issue
Block a user