mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-17 09:29:28 +01:00
fix: Send read markers
This commit is contained in:
parent
01fbaae93d
commit
08dd2d7d22
@ -160,17 +160,6 @@ class ChatController extends State<Chat> {
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
if (room.notificationCount != null &&
|
||||
room.notificationCount > 0 &&
|
||||
timeline != null &&
|
||||
timeline.events.isNotEmpty &&
|
||||
Matrix.of(context).webHasFocus) {
|
||||
// ignore: unawaited_futures
|
||||
room.sendReadMarker(
|
||||
timeline.events.first.eventId,
|
||||
readReceiptLocationEventId: timeline.events.first.eventId,
|
||||
);
|
||||
}
|
||||
|
||||
// when the scroll controller is attached we want to scroll to an event id, if specified
|
||||
// and update the scroll controller...which will trigger a request history, if the
|
||||
@ -185,6 +174,17 @@ class ChatController extends State<Chat> {
|
||||
});
|
||||
}
|
||||
filteredEvents = timeline.getFilteredEvents(unfolded: unfolded);
|
||||
if (room.notificationCount != null &&
|
||||
room.notificationCount > 0 &&
|
||||
timeline != null &&
|
||||
timeline.events.isNotEmpty &&
|
||||
Matrix.of(context).webHasFocus) {
|
||||
// ignore: unawaited_futures
|
||||
room.sendReadMarker(
|
||||
timeline.events.first.eventId,
|
||||
readReceiptLocationEventId: timeline.events.first.eventId,
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user