[Room] Fix state handling for real

This commit is contained in:
Sorunome 2019-11-22 09:53:48 +01:00
parent 3407c2f605
commit 0356a24b76
No known key found for this signature in database
GPG key ID: 63E31F7B5993A9C4

View file

@ -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);
}
}