fix: Send read receipt only on focus

This commit is contained in:
Christian Pauly 2020-08-22 16:09:15 +02:00
parent c119f43d1c
commit 98316f1b4e
1 changed files with 2 additions and 1 deletions

View File

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