Update lib/views/chat.dart

This commit is contained in:
Christian Pauly 2020-01-24 11:10:35 +00:00
parent a9b9e80b28
commit 5cf7e7f3dd

View File

@ -13,6 +13,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:toast/toast.dart'; import 'package:toast/toast.dart';
import 'package:pedantic/pedantic.dart';
import 'chat_list.dart'; import 'chat_list.dart';
@ -90,7 +91,7 @@ class _ChatState extends State<Chat> {
if (timeline == null) { if (timeline == null) {
timeline = await room.getTimeline(onUpdate: updateView); timeline = await room.getTimeline(onUpdate: updateView);
if (timeline.events.isNotEmpty) { if (timeline.events.isNotEmpty) {
room.sendReadReceipt(timeline.events.first.eventId); unawaited(room.sendReadReceipt(timeline.events.first.eventId));
} }
} }
updateView(); updateView();