Reenable top bar room settings menus on avatar or title clicks
Also fixes a bug with an empty room settings window introduced in the port.
This commit is contained in:
parent
640b0ee405
commit
77e241b9e5
6 changed files with 29 additions and 15 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue