-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add confirmation box before forgetting a room #331
base: dev
Are you sure you want to change the base?
Conversation
client/roomlistdock.cpp
Outdated
room->connection()->forgetRoom(room->id()); | ||
if (auto room = getSelectedRoom()) { | ||
QMessageBox confirmBox(QMessageBox::Question, | ||
tr("Are you sure?"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather use something like "Really forget the room?".
client/roomlistdock.cpp
Outdated
tr("Do you want to forget the room %1").arg(room->displayName()), | ||
QMessageBox::Yes|QMessageBox::No, this); | ||
if (confirmBox.exec() == QMessageBox::No) | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use comparison with QMessageBox::Yes
and omit the else branch entirely instead?
client/roomlistdock.cpp
Outdated
if (auto room = getSelectedRoom()) { | ||
QMessageBox confirmBox(QMessageBox::Question, | ||
tr("Are you sure?"), | ||
tr("Do you want to forget the room %1").arg(room->displayName()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather force a "disambiguated" name here (meaning - attach canonical alias even in the case when the name exists, and even add a room id if neither room name nor canonical alias exist). The latter one is dubious because people don't know room id's but most people certainly know canonical aliases.
Fixes #236