mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Fix a few join confirmations too many
This commit is contained in:
parent
626d8bf151
commit
f4164cc799
2 changed files with 13 additions and 8 deletions
|
@ -901,17 +901,20 @@ 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 !=
|
||||
QMessageBox::question(
|
||||
this,
|
||||
tr("Confirm join"),
|
||||
tr("Do you really want to join %1?").arg(QString::fromStdString(room_id))))
|
||||
if (promptForConfirmation &&
|
||||
QMessageBox::Yes !=
|
||||
QMessageBox::question(
|
||||
this,
|
||||
tr("Confirm join"),
|
||||
tr("Do you really want to join %1?").arg(QString::fromStdString(room_id))))
|
||||
return;
|
||||
|
||||
http::client()->join_room(
|
||||
|
|
|
@ -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…
Reference in a new issue