fix: Send read receipt only on focus

onboarding
Christian Pauly 5 years ago
parent 1dbff85341
commit d26e830b17

@ -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);
} }

Loading…
Cancel
Save