mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Don't set initial room with an empty room list
This commit is contained in:
parent
6d9acc8621
commit
9d9b5e4f68
1 changed files with 3 additions and 0 deletions
|
@ -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 a new issue