[RoomList] Fix empty room

This commit is contained in:
Christian Pauly 2019-07-23 14:50:09 +02:00
parent 3e8b54d9f0
commit ee883a8e84

View file

@ -125,7 +125,15 @@ class RoomList {
}
final bool found = (j < rooms.length && rooms[j].id == eventUpdate.roomID);
if (!found) {
rooms.insert(0, Room(id: eventUpdate.roomID));
rooms.insert(
0,
Room(
id: eventUpdate.roomID,
membership: Membership.join,
name: "",
prev_batch: "",
highlightCount: 0,
notificationCount: 0));
if (onInsert != null) onInsert(0);
j = 0;
}