[RoomList] Add debug prints
This commit is contained in:
parent
19d06920e2
commit
a237b71da9
|
@ -134,6 +134,7 @@ class RoomList {
|
|||
}
|
||||
|
||||
void _handleEventUpdate(EventUpdate eventUpdate) {
|
||||
print("_handleEventUpdate");
|
||||
// Search the room in the rooms
|
||||
num j = 0;
|
||||
for (j = 0; j < rooms.length; j++) {
|
||||
|
@ -141,10 +142,12 @@ 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