mirror of https://github.com/procxx/kepka.git
Don't display admin stars if admins are disabled.
This commit is contained in:
parent
52195ff95a
commit
5e77fe8412
|
@ -404,7 +404,7 @@ void GroupMembersWidget::setItemFlags(Item *item, ChatData *chat) {
|
||||||
using AdminState = Item::AdminState;
|
using AdminState = Item::AdminState;
|
||||||
auto user = getMember(item)->user();
|
auto user = getMember(item)->user();
|
||||||
auto isCreator = (peerFromUser(chat->creator) == item->peer->id);
|
auto isCreator = (peerFromUser(chat->creator) == item->peer->id);
|
||||||
auto isAdmin = chat->admins.contains(user);
|
auto isAdmin = chat->adminsEnabled() && chat->admins.contains(user);
|
||||||
auto adminState = isCreator ? AdminState::Creator : isAdmin ? AdminState::Admin : AdminState::None;
|
auto adminState = isCreator ? AdminState::Creator : isAdmin ? AdminState::Admin : AdminState::None;
|
||||||
item->adminState = adminState;
|
item->adminState = adminState;
|
||||||
if (item->peer->id == Auth().userPeerId()) {
|
if (item->peer->id == Auth().userPeerId()) {
|
||||||
|
|
Loading…
Reference in New Issue