mirror of https://github.com/procxx/kepka.git
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() {
|
void SettingsWidget::refreshManageBannedUsersButton() {
|
||||||
auto hasManageBannedUsers = [this] {
|
auto hasManageBannedUsers = [this] {
|
||||||
if (auto channel = peer()->asMegagroup()) {
|
if (auto channel = peer()->asMegagroup()) {
|
||||||
return channel->hasAdminRights() && (channel->kickedCount() > 0);
|
return channel->canViewBanned() && (channel->kickedCount() > 0);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
@ -169,7 +169,7 @@ void SettingsWidget::refreshManageBannedUsersButton() {
|
||||||
|
|
||||||
auto hasManageRestrictedUsers = [this] {
|
auto hasManageRestrictedUsers = [this] {
|
||||||
if (auto channel = peer()->asMegagroup()) {
|
if (auto channel = peer()->asMegagroup()) {
|
||||||
return channel->hasAdminRights() && (channel->restrictedCount() > 0);
|
return channel->canViewBanned() && (channel->restrictedCount() > 0);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
|
@ -892,6 +892,9 @@ public:
|
||||||
bool canViewAdmins() const {
|
bool canViewAdmins() const {
|
||||||
return (isMegagroup() || hasAdminRights() || amCreator());
|
return (isMegagroup() || hasAdminRights() || amCreator());
|
||||||
}
|
}
|
||||||
|
bool canViewBanned() const {
|
||||||
|
return (hasAdminRights() || amCreator());
|
||||||
|
}
|
||||||
bool canEditInformation() const {
|
bool canEditInformation() const {
|
||||||
return adminRights().is_change_info() || amCreator();
|
return adminRights().is_change_info() || amCreator();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue