Skip to content
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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

marcdeop
Copy link
Contributor

Fixes #236

@marcdeop marcdeop self-assigned this Mar 18, 2018
@KitsuneRal KitsuneRal self-requested a review March 19, 2018 13:43
room->connection()->forgetRoom(room->id());
if (auto room = getSelectedRoom()) {
QMessageBox confirmBox(QMessageBox::Question,
tr("Are you sure?"),
Copy link
Member

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?".

tr("Do you want to forget the room %1").arg(room->displayName()),
QMessageBox::Yes|QMessageBox::No, this);
if (confirmBox.exec() == QMessageBox::No)
;
Copy link
Member

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?

if (auto room = getSelectedRoom()) {
QMessageBox confirmBox(QMessageBox::Question,
tr("Are you sure?"),
tr("Do you want to forget the room %1").arg(room->displayName()),
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants