mirror of https://github.com/procxx/kepka.git
fixed admin badge display in groups
This commit is contained in:
parent
978e86a8ba
commit
6710ef3e2f
|
@ -891,7 +891,6 @@ namespace App {
|
|||
}
|
||||
} else {
|
||||
chat->flags &= ~MTPDchat::Flag::f_admins_enabled;
|
||||
chat->flags &= ~MTPDchat::Flag::f_admin;
|
||||
}
|
||||
if (emitPeerUpdated) {
|
||||
App::main()->peerUpdated(chat);
|
||||
|
|
|
@ -1034,7 +1034,7 @@ void ProfileInner::paintEvent(QPaintEvent *e) {
|
|||
data->online = App::onlineText(user, l_time);
|
||||
}
|
||||
if (_peerChat) {
|
||||
data->admin = (peerFromUser(_peerChat->creator) == user->id) || (_peerChat->admins.constFind(user) != _peerChat->admins.cend());
|
||||
data->admin = (peerFromUser(_peerChat->creator) == user->id) || (_peerChat->adminsEnabled() && (_peerChat->admins.constFind(user) != _peerChat->admins.cend()));
|
||||
} else if (_peerChannel) {
|
||||
data->admin = (_peerChannel->mgInfo->lastAdmins.constFind(user) != _peerChannel->mgInfo->lastAdmins.cend());
|
||||
} else {
|
||||
|
|
|
@ -491,7 +491,7 @@ public:
|
|||
return flags & MTPDchat::Flag::f_creator;
|
||||
}
|
||||
bool amAdmin() const {
|
||||
return flags & MTPDchat::Flag::f_admin;
|
||||
return (flags & MTPDchat::Flag::f_admin) && adminsEnabled();
|
||||
}
|
||||
bool isDeactivated() const {
|
||||
return flags & MTPDchat::Flag::f_deactivated;
|
||||
|
|
Loading…
Reference in New Issue