diff --git a/lib/src/room.dart b/lib/src/room.dart index 861f41d2..37ed4f5e 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -1187,6 +1187,12 @@ class Room { Future forget() async { await client.database?.forgetRoom(id); await client.forgetRoom(id); + // Update archived rooms, otherwise an archived room may still be in the + // list after a forget room call + final roomIndex = client.archivedRooms.indexWhere((r) => r.room.id == id); + if(roomIndex != -1){ + client.archivedRooms.removeAt(roomIndex); + } return; }