fix: timeline pagination

This commit is contained in:
Erwan Leboucher 2026-08-09 23:13:54 +02:00
commit 1723a0691a
No known key found for this signature in database
GPG key ID: E191CC9EB650480E

View file

@ -37,8 +37,7 @@ class RoomChatController extends AsyncNotifier<IList<Event>?> {
room = ref.read(RoomsController.provider)[roomId] ?? room;
}
// While there are under 20 events, try to load more
// until there's no more or the conditions are met.
// Load one more page when the initial timeline is short.
if (room.hasMore && room.timeline.length < 20) {
await loadOlder();
room = ref.read(RoomsController.provider)[roomId] ?? room;