|
|
|
@ -340,9 +340,7 @@ MainWindow::openUserProfile(const QString &user_id, const QString &room_id) |
|
|
|
|
void |
|
|
|
|
MainWindow::openRoomSettings(const QString &room_id) |
|
|
|
|
{ |
|
|
|
|
const auto roomToSearch = room_id.isEmpty() ? chat_page_->currentRoom() : ""; |
|
|
|
|
|
|
|
|
|
auto dialog = new dialogs::RoomSettings(roomToSearch, this); |
|
|
|
|
auto dialog = new dialogs::RoomSettings(room_id, this); |
|
|
|
|
|
|
|
|
|
showDialog(dialog); |
|
|
|
|
} |
|
|
|
@ -350,8 +348,7 @@ MainWindow::openRoomSettings(const QString &room_id) |
|
|
|
|
void |
|
|
|
|
MainWindow::openMemberListDialog(const QString &room_id) |
|
|
|
|
{ |
|
|
|
|
const auto roomToSearch = room_id.isEmpty() ? chat_page_->currentRoom() : ""; |
|
|
|
|
auto dialog = new dialogs::MemberList(roomToSearch, this); |
|
|
|
|
auto dialog = new dialogs::MemberList(room_id, this); |
|
|
|
|
|
|
|
|
|
showDialog(dialog); |
|
|
|
|
} |
|
|
|
@ -359,11 +356,9 @@ MainWindow::openMemberListDialog(const QString &room_id) |
|
|
|
|
void |
|
|
|
|
MainWindow::openLeaveRoomDialog(const QString &room_id) |
|
|
|
|
{ |
|
|
|
|
auto roomToLeave = room_id.isEmpty() ? chat_page_->currentRoom() : room_id; |
|
|
|
|
|
|
|
|
|
auto dialog = new dialogs::LeaveRoom(this); |
|
|
|
|
connect(dialog, &dialogs::LeaveRoom::leaving, this, [this, roomToLeave]() { |
|
|
|
|
chat_page_->leaveRoom(roomToLeave); |
|
|
|
|
connect(dialog, &dialogs::LeaveRoom::leaving, this, [this, room_id]() { |
|
|
|
|
chat_page_->leaveRoom(room_id); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
showDialog(dialog); |
|
|
|
|