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:
commit
b06c6254c3
|
@ -637,12 +637,11 @@ class Room {
|
||||||
roomAccountData: {},
|
roomAccountData: {},
|
||||||
);
|
);
|
||||||
|
|
||||||
StatesMap newStates = StatesMap();
|
|
||||||
if (states != null) {
|
if (states != null) {
|
||||||
List<Map<String, dynamic>> rawStates = await states;
|
List<Map<String, dynamic>> rawStates = await states;
|
||||||
for (int i = 0; i < rawStates.length; i++) {
|
for (int i = 0; i < rawStates.length; i++) {
|
||||||
RoomState newState = RoomState.fromJson(rawStates[i], newRoom);
|
RoomState newState = RoomState.fromJson(rawStates[i], newRoom);
|
||||||
newStates.states[newState.typeKey][newState.stateKey] = newState;
|
newRoom.setState(newState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue