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 {
|
try {
|
||||||
await loadTimelineFuture;
|
await loadTimelineFuture;
|
||||||
final fullyRead = room.fullyRead;
|
final fullyRead = room.fullyRead;
|
||||||
if (fullyRead.isEmpty) return;
|
if (fullyRead.isEmpty) {
|
||||||
|
setReadMarker();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (timeline!.events.any((event) => event.eventId == fullyRead)) {
|
if (timeline!.events.any((event) => event.eventId == fullyRead)) {
|
||||||
Logs().v('Scroll up to visible event', fullyRead);
|
Logs().v('Scroll up to visible event', fullyRead);
|
||||||
|
setReadMarker();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
|
|
@ -362,7 +366,6 @@ class ChatController extends State<ChatPageWithRoom>
|
||||||
}
|
}
|
||||||
timeline!.requestKeys(onlineKeyBackupOnly: false);
|
timeline!.requestKeys(onlineKeyBackupOnly: false);
|
||||||
if (room.markedUnread) room.markUnread(false);
|
if (room.markedUnread) room.markUnread(false);
|
||||||
setReadMarker();
|
|
||||||
|
|
||||||
// when the scroll controller is attached we want to scroll to an event id, if specified
|
// 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
|
// and update the scroll controller...which will trigger a request history, if the
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue