[Room] LastEvent can be null
This commit is contained in:
parent
6d143241eb
commit
19d06920e2
|
@ -126,7 +126,7 @@ class Room {
|
||||||
|
|
||||||
Event get lastEvent {
|
Event get lastEvent {
|
||||||
ChatTime lastTime = ChatTime(0);
|
ChatTime lastTime = ChatTime(0);
|
||||||
Event lastEvent = Event();
|
Event lastEvent = null;
|
||||||
states.forEach((String key, RoomState state) {
|
states.forEach((String key, RoomState state) {
|
||||||
if (state.time > lastTime) {
|
if (state.time > lastTime) {
|
||||||
lastTime = state.time;
|
lastTime = state.time;
|
||||||
|
|
Loading…
Reference in a new issue