Merge branch 'room-fix-state-handling-again' into 'master'

[Room] Fix state handling for real

See merge request famedly/famedlysdk!123
This commit is contained in:
Christian Pauly 2019-11-26 06:40:03 +00:00
commit b06c6254c3
1 changed files with 1 additions and 2 deletions

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