diff --git a/lib/src/RoomList.dart b/lib/src/RoomList.dart index f0a10603..f03da4f4 100644 --- a/lib/src/RoomList.dart +++ b/lib/src/RoomList.dart @@ -124,7 +124,11 @@ class RoomList { if (rooms[j].id == eventUpdate.roomID) break; } final bool found = (j < rooms.length && rooms[j].id == eventUpdate.roomID); - if (!found) return; + if (!found) { + rooms.insert(0, Room(id: eventUpdate.roomID)); + if (onInsert != null) onInsert(0); + j = 0; + } // Is this an old timeline event? Then stop here... /*if (eventUpdate.type == "timeline" &&