2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 14:17: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:
Viktor Oreshkin
2017-07-01 08:45:42 +03:00
committed by John Preston
parent 96d1fe336a
commit bca0e1e16c

View File

@@ -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;
} }
} }