From 0356a24b76cf22ac0136ed3755923c61be7671f7 Mon Sep 17 00:00:00 2001 From: Sorunome Date: Fri, 22 Nov 2019 09:53:48 +0100 Subject: [PATCH] [Room] Fix state handling for real --- lib/src/Room.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/src/Room.dart b/lib/src/Room.dart index 284bb3c..cc63528 100644 --- a/lib/src/Room.dart +++ b/lib/src/Room.dart @@ -637,12 +637,11 @@ class Room { roomAccountData: {}, ); - StatesMap newStates = StatesMap(); if (states != null) { List> rawStates = await states; for (int i = 0; i < rawStates.length; i++) { RoomState newState = RoomState.fromJson(rawStates[i], newRoom); - newStates.states[newState.typeKey][newState.stateKey] = newState; + newRoom.setState(newState); } }