mirror of
https://github.com/krille-chan/fluffychat
synced 2024-10-05 14:32:43 +00:00
chore: Follow up set room read marker
This commit is contained in:
parent
e0e1b65f77
commit
8dd8edae44
1 changed files with 5 additions and 2 deletions
|
@ -291,9 +291,13 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
try {
|
||||
await loadTimelineFuture;
|
||||
final fullyRead = room.fullyRead;
|
||||
if (fullyRead.isEmpty) return;
|
||||
if (fullyRead.isEmpty) {
|
||||
setReadMarker();
|
||||
return;
|
||||
}
|
||||
if (timeline!.events.any((event) => event.eventId == fullyRead)) {
|
||||
Logs().v('Scroll up to visible event', fullyRead);
|
||||
setReadMarker();
|
||||
return;
|
||||
}
|
||||
if (!mounted) return;
|
||||
|
@ -362,7 +366,6 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
}
|
||||
timeline!.requestKeys(onlineKeyBackupOnly: false);
|
||||
if (room.markedUnread) room.markUnread(false);
|
||||
setReadMarker();
|
||||
|
||||
// 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
|
||||
|
|
Loading…
Reference in a new issue