mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +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)
|
ChatPage::joinRoom(const QString &room)
|
||||||
{
|
{
|
||||||
const auto room_id = room.toStdString();
|
const auto room_id = room.toStdString();
|
||||||
joinRoomVia(room_id, {});
|
joinRoomVia(room_id, {}, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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::question(
|
QMessageBox::Yes !=
|
||||||
this,
|
QMessageBox::question(
|
||||||
tr("Confirm join"),
|
this,
|
||||||
tr("Do you really want to join %1?").arg(QString::fromStdString(room_id))))
|
tr("Confirm join"),
|
||||||
|
tr("Do you really want to join %1?").arg(QString::fromStdString(room_id))))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
http::client()->join_room(
|
http::client()->join_room(
|
||||||
|
|
|
@ -105,7 +105,9 @@ public slots:
|
||||||
void leaveRoom(const QString &room_id);
|
void leaveRoom(const QString &room_id);
|
||||||
void createRoom(const mtx::requests::CreateRoom &req);
|
void createRoom(const mtx::requests::CreateRoom &req);
|
||||||
void joinRoom(const QString &room);
|
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 inviteUser(QString userid, QString reason);
|
||||||
void kickUser(QString userid, QString reason);
|
void kickUser(QString userid, QString reason);
|
||||||
|
|
Loading…
Reference in a new issue