2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Use EditPeerInfoBox for editing groups.

This allows to edit group invite links.
Rename EditNameTitleBox to EditNameBox, used only from Settings.
This commit is contained in:
John Preston
2017-12-02 16:04:22 +04:00
parent da77c10f60
commit 8391d43057
8 changed files with 245 additions and 171 deletions

View File

@@ -27,6 +27,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "boxes/report_box.h"
#include "boxes/peer_list_controllers.h"
#include "boxes/peers/manage_peer_box.h"
#include "boxes/peers/edit_peer_info_box.h"
#include "core/tl_help.h"
#include "auth_session.h"
#include "apiwrap.h"
@@ -341,19 +342,8 @@ void Filler::addChatActions(not_null<ChatData*> chat) {
if (_source != PeerMenuSource::ChatsList) {
if (chat->canEdit()) {
_addAction(
lang(lng_profile_edit_group_name),
[chat] { Ui::show(Box<EditNameTitleBox>(chat)); });
}
if (chat->amCreator()
&& !chat->isDeactivated()) {
_addAction(
lang(lng_profile_manage_admins),
[chat] { EditChatAdminsBoxController::Start(chat); });
_addAction(
lang(lng_profile_migrate_button),
[chat] { Ui::show(Box<ConvertToSupergroupBox>(chat)); });
}
if (chat->canEdit()) {
lang(lng_manage_group_title),
[chat] { Ui::show(Box<EditPeerInfoBox>(chat)); });
_addAction(
lang(lng_profile_add_participant),
[chat] { AddChatMembers(chat); });