mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-04-01 00:08:02 +00:00
Show manage banned and restricted to creator.
This commit is contained in:
parent
9e6f2a5d2e
commit
b398444b91
@ -156,7 +156,7 @@ void SettingsWidget::refreshManageAdminsButton() {
|
||||
void SettingsWidget::refreshManageBannedUsersButton() {
|
||||
auto hasManageBannedUsers = [this] {
|
||||
if (auto channel = peer()->asMegagroup()) {
|
||||
return channel->hasAdminRights() && (channel->kickedCount() > 0);
|
||||
return channel->canViewBanned() && (channel->kickedCount() > 0);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
@ -169,7 +169,7 @@ void SettingsWidget::refreshManageBannedUsersButton() {
|
||||
|
||||
auto hasManageRestrictedUsers = [this] {
|
||||
if (auto channel = peer()->asMegagroup()) {
|
||||
return channel->hasAdminRights() && (channel->restrictedCount() > 0);
|
||||
return channel->canViewBanned() && (channel->restrictedCount() > 0);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
@ -892,6 +892,9 @@ public:
|
||||
bool canViewAdmins() const {
|
||||
return (isMegagroup() || hasAdminRights() || amCreator());
|
||||
}
|
||||
bool canViewBanned() const {
|
||||
return (hasAdminRights() || amCreator());
|
||||
}
|
||||
bool canEditInformation() const {
|
||||
return adminRights().is_change_info() || amCreator();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user