Fix a few join confirmations too many

pull/509/head
Nicolas Werner 4 years ago
parent 626d8bf151
commit f4164cc799
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 9
      src/ChatPage.cpp
  2. 4
      src/ChatPage.h

@ -901,13 +901,16 @@ void
ChatPage::joinRoom(const QString &room)
{
const auto room_id = room.toStdString();
joinRoomVia(room_id, {});
joinRoomVia(room_id, {}, false);
}
void
ChatPage::joinRoomVia(const std::string &room_id, const std::vector<std::string> &via)
ChatPage::joinRoomVia(const std::string &room_id,
const std::vector<std::string> &via,
bool promptForConfirmation)
{
if (QMessageBox::Yes !=
if (promptForConfirmation &&
QMessageBox::Yes !=
QMessageBox::question(
this,
tr("Confirm join"),

@ -105,7 +105,9 @@ public slots:
void leaveRoom(const QString &room_id);
void createRoom(const mtx::requests::CreateRoom &req);
void joinRoom(const QString &room);
void joinRoomVia(const std::string &room_id, const std::vector<std::string> &via);
void joinRoomVia(const std::string &room_id,
const std::vector<std::string> &via,
bool promptForConfirmation = true);
void inviteUser(QString userid, QString reason);
void kickUser(QString userid, QString reason);

Loading…
Cancel
Save