mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 06:25:15 +00:00
fix: Set readmarker sometimes not working
This commit is contained in:
parent
f5cf1b4d70
commit
bb96a0a4a3
1 changed files with 1 additions and 2 deletions
|
@ -379,13 +379,12 @@ class ChatController extends State<ChatPageWithRoom> {
|
|||
final timeline = this.timeline;
|
||||
if (timeline == null || timeline.events.isEmpty) return;
|
||||
|
||||
eventId ??= timeline.events.first.eventId;
|
||||
Logs().v('Set read marker...', eventId);
|
||||
// ignore: unawaited_futures
|
||||
_setReadMarkerFuture = timeline.setReadMarker(eventId: eventId).then((_) {
|
||||
_setReadMarkerFuture = null;
|
||||
});
|
||||
if (eventId == timeline.events.first.eventId) {
|
||||
if (eventId == null || eventId == timeline.room.lastEvent?.eventId) {
|
||||
Matrix.of(context).backgroundPush?.cancelNotification(roomId);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue