Merge branch 'krille/read-receipt-fix' into 'master'

fix: Send read receipt only on focus

See merge request ChristianPauly/fluffychat-flutter!140
This commit is contained in:
Christian Pauly 2020-08-22 14:19:21 +00:00
commit eb502b7c7f

View File

@ -494,7 +494,8 @@ class _ChatState extends State<_Chat> {
if (room.notificationCount != null && if (room.notificationCount != null &&
room.notificationCount > 0 && room.notificationCount > 0 &&
timeline != null && timeline != null &&
timeline.events.isNotEmpty) { timeline.events.isNotEmpty &&
Matrix.of(context).webHasFocus) {
room.sendReadReceipt(timeline.events.first.eventId); room.sendReadReceipt(timeline.events.first.eventId);
} }