mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-27 09:03:02 +00:00
Fix members kick from group members dropdown.
This commit is contained in:
parent
3db913f15b
commit
4c6e1b2b1f
@ -117,14 +117,14 @@ void GroupMembersWidget::removePeer(PeerData *selectedPeer) {
|
||||
currentRestrictedRights = it->rights;
|
||||
}
|
||||
}
|
||||
Ui::show(Box<ConfirmBox>(text, lang(lng_box_remove), base::lambda_guarded(this, [user, currentRestrictedRights, peer = peer()] {
|
||||
Ui::show(Box<ConfirmBox>(text, lang(lng_box_remove), [user, currentRestrictedRights, peer = peer()] {
|
||||
Ui::hideLayer();
|
||||
if (auto chat = peer->asChat()) {
|
||||
if (App::main()) App::main()->kickParticipant(chat, user);
|
||||
} else if (auto channel = peer->asChannel()) {
|
||||
if (App::api()) App::api()->kickParticipant(channel, user, currentRestrictedRights);
|
||||
}
|
||||
})));
|
||||
}));
|
||||
}
|
||||
|
||||
void GroupMembersWidget::notifyPeerUpdated(const Notify::PeerUpdate &update) {
|
||||
|
Loading…
Reference in New Issue
Block a user