2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Unblock bots without restarting from Settings.

This commit is contained in:
John Preston
2019-07-04 16:02:22 +02:00
parent 0e964b06dc
commit 9d09cee1cc
8 changed files with 46 additions and 40 deletions

View File

@@ -615,14 +615,12 @@ void ActionsFiller::addBlockAction(not_null<UserData*> user) {
});
auto callback = [=] {
if (user->isBlocked()) {
user->session().api().unblockUser(user);
Window::PeerMenuUnblockUserWithBotRestart(user);
if (user->botInfo) {
Ui::showPeerHistory(user, ShowAtUnreadMsgId);
}
} else if (user->isBot()) {
user->session().api().blockUser(user);
} else {
window->show(Box(Window::PeerMenuBlockUserBox, window, user));
user->session().api().blockUser(user);
}
};
AddActionButton(