From ee883a8e84db476810edec34c07b11b3b449ed00 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Tue, 23 Jul 2019 14:50:09 +0200 Subject: [PATCH] [RoomList] Fix empty room --- lib/src/RoomList.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/src/RoomList.dart b/lib/src/RoomList.dart index f03da4f..2e76613 100644 --- a/lib/src/RoomList.dart +++ b/lib/src/RoomList.dart @@ -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; }