[RoomList] Dont handle account data
This commit is contained in:
parent
a237b71da9
commit
2061b96992
|
@ -134,7 +134,7 @@ class RoomList {
|
|||
}
|
||||
|
||||
void _handleEventUpdate(EventUpdate eventUpdate) {
|
||||
print("_handleEventUpdate");
|
||||
if (eventUpdate.type != "timeline" && eventUpdate.type != "state") return;
|
||||
// Search the room in the rooms
|
||||
num j = 0;
|
||||
for (j = 0; j < rooms.length; j++) {
|
||||
|
@ -142,12 +142,10 @@ class RoomList {
|
|||
}
|
||||
final bool found = (j < rooms.length && rooms[j].id == eventUpdate.roomID);
|
||||
if (!found) return;
|
||||
print("found!");
|
||||
|
||||
RoomState stateEvent = RoomState.fromJson(eventUpdate.content, rooms[j]);
|
||||
if (rooms[j].states[stateEvent.key] != null &&
|
||||
rooms[j].states[stateEvent.key].time > stateEvent.time) return;
|
||||
print("is a new eventupdate");
|
||||
rooms[j].states[stateEvent.key] = stateEvent;
|
||||
sortAndUpdate();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue