diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-04-24 20:05:24 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-04-24 20:05:24 +0300 |
commit | 9d9b5e4f6897b68ba42e0db6d316474a2451df87 (patch) | |
tree | ff1e27b87bf61efb43c1156f03bf9ca7d4901e4b /src/RoomList.cc | |
parent | Add common style for the scroll bars (diff) | |
download | nheko-9d9b5e4f6897b68ba42e0db6d316474a2451df87.tar.xz |
Don't set initial room with an empty room list
Diffstat (limited to '')
-rw-r--r-- | src/RoomList.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/RoomList.cc b/src/RoomList.cc index 8db1e7b2..4fbccee0 100644 --- a/src/RoomList.cc +++ b/src/RoomList.cc @@ -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); |