mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
Nothing in the UI confirmed that a user had been added to the ignore list, so the action felt ambiguous and could be repeated by accident. Show an information dialog when the server acknowledges the add-to-ignore command. Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
8e0bdafb14
commit
fff506dbbe
1 changed files with 9 additions and 1 deletions
|
|
@ -606,7 +606,15 @@ void UserContextMenu::execAddToIgnore(const QString &userName)
|
||||||
Command_AddToList cmd;
|
Command_AddToList cmd;
|
||||||
cmd.set_list("ignore");
|
cmd.set_list("ignore");
|
||||||
cmd.set_user_name(userName.toStdString());
|
cmd.set_user_name(userName.toStdString());
|
||||||
client->sendCommand(client->prepareSessionCommand(cmd));
|
PendingCommand *pend = client->prepareSessionCommand(cmd);
|
||||||
|
connect(pend, &PendingCommand::finished, this,
|
||||||
|
[this, userName](const Response &response, const CommandContainer &, const QVariant &) {
|
||||||
|
if (response.response_code() == Response::RespOk) {
|
||||||
|
QMessageBox::information(static_cast<QWidget *>(parent()), tr("Ignore list"),
|
||||||
|
tr("%1 has been added to your ignore list.").arg(userName));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
client->sendCommand(pend);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserContextMenu::execRemoveFromIgnore(const QString &userName)
|
void UserContextMenu::execRemoveFromIgnore(const QString &userName)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue