mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 06:07:45 +00:00
Fix remove option in normal groups
If user invites X to group and then X becomes an admin, user won't be able to remove X anymore, so remove option shouldn't be shown. Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
This commit is contained in:
parent
96d1fe336a
commit
bca0e1e16c
@ -398,8 +398,10 @@ void GroupMembersWidget::setItemFlags(Item *item, ChatData *chat) {
|
|||||||
item->hasRemoveLink = false;
|
item->hasRemoveLink = false;
|
||||||
} else if (chat->amCreator() || (chat->amAdmin() && !item->hasAdminStar)) {
|
} else if (chat->amCreator() || (chat->amAdmin() && !item->hasAdminStar)) {
|
||||||
item->hasRemoveLink = true;
|
item->hasRemoveLink = true;
|
||||||
|
} else if (chat->invitedByMe.contains(user) && !item->hasAdminStar) {
|
||||||
|
item->hasRemoveLink = true;
|
||||||
} else {
|
} else {
|
||||||
item->hasRemoveLink = chat->invitedByMe.contains(user);
|
item->hasRemoveLink = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user