mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Always allow group admins to edit invite link.
Show Group Info even if supergroup admin can't edit information.
This commit is contained in:
parent
3b3a705a67
commit
b20c2b4774
1 changed files with 10 additions and 1 deletions
|
@ -102,7 +102,16 @@ void ShowRecentActions(
|
|||
not_null<Window::Controller*> controller,
|
||||
not_null<ChannelData*> channel) {
|
||||
controller->showSection(AdminLog::SectionMemento(channel));
|
||||
}
|
||||
|
||||
bool HasEditInfoBox(not_null<ChannelData*> channel) {
|
||||
if (channel->canEditInformation()) {
|
||||
return true;
|
||||
} else if (!channel->isPublic() && channel->canAddMembers()) {
|
||||
// Edit invite link.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void FillManageBox(
|
||||
|
@ -112,7 +121,7 @@ void FillManageBox(
|
|||
using Profile::ParticipantsBoxController;
|
||||
|
||||
auto isGroup = channel->isMegagroup();
|
||||
if (channel->canEditInformation()) {
|
||||
if (HasEditInfoBox(channel)) {
|
||||
AddButton(
|
||||
content,
|
||||
Lang::Viewer(isGroup
|
||||
|
|
Loading…
Add table
Reference in a new issue