From 98316f1b4eb21ec9c2c6e408ae92152c330fed78 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sat, 22 Aug 2020 16:09:15 +0200 Subject: [PATCH] fix: Send read receipt only on focus --- lib/views/chat.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/views/chat.dart b/lib/views/chat.dart index 929a3ccf..7d7ecbe1 100644 --- a/lib/views/chat.dart +++ b/lib/views/chat.dart @@ -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); }