Don't set initial room with an empty room list
This commit is contained in:
parent
6d9acc8621
commit
9d9b5e4f68
@ -131,6 +131,9 @@ void RoomList::setInitialRooms(const Rooms &rooms)
|
||||
ui->scrollVerticalLayout->insertWidget(pos, room_item);
|
||||
}
|
||||
|
||||
if (rooms_.isEmpty())
|
||||
return;
|
||||
|
||||
// TODO: Move this into its own function.
|
||||
auto first_room = rooms_.first();
|
||||
first_room->setPressedState(true);
|
||||
|
Loading…
Reference in New Issue
Block a user