[Room] Fix state handling for real
This commit is contained in:
parent
3407c2f605
commit
0356a24b76
|
@ -637,12 +637,11 @@ class Room {
|
|||
roomAccountData: {},
|
||||
);
|
||||
|
||||
StatesMap newStates = StatesMap();
|
||||
if (states != null) {
|
||||
List<Map<String, dynamic>> 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue