forked from Nexus/nexus
fix: timeline pagination
This commit is contained in:
parent
3eb39e6782
commit
1723a0691a
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue