mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Show anti-spam checkbox only to admins.
This commit is contained in:
parent
273a2809cf
commit
74ecd44294
1 changed files with 8 additions and 5 deletions
|
@ -1187,11 +1187,14 @@ void ParticipantsBoxController::prepare() {
|
||||||
}
|
}
|
||||||
Unexpected("Role in ParticipantsBoxController::prepare()");
|
Unexpected("Role in ParticipantsBoxController::prepare()");
|
||||||
}();
|
}();
|
||||||
if ((_role == Role::Admins) && _peer->isMegagroup()) {
|
if (const auto megagroup = _peer->asMegagroup()) {
|
||||||
const auto validator = AntiSpamMenu::AntiSpamValidator(
|
if ((_role == Role::Admins)
|
||||||
_navigation->parentController(),
|
&& (megagroup->amCreator() || megagroup->hasAdminRights())) {
|
||||||
_peer->asChannel());
|
const auto validator = AntiSpamMenu::AntiSpamValidator(
|
||||||
delegate()->peerListSetAboveWidget(validator.createButton());
|
_navigation->parentController(),
|
||||||
|
_peer->asChannel());
|
||||||
|
delegate()->peerListSetAboveWidget(validator.createButton());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
delegate()->peerListSetSearchMode(PeerListSearchMode::Enabled);
|
delegate()->peerListSetSearchMode(PeerListSearchMode::Enabled);
|
||||||
delegate()->peerListSetTitle(std::move(title));
|
delegate()->peerListSetTitle(std::move(title));
|
||||||
|
|
Loading…
Add table
Reference in a new issue