implemented backward pagination for chat history with on-scroll prefetching

This commit is contained in:
2026-07-17 20:14:47 +02:00
parent 101e7c909c
commit f3cd7896d9
7 changed files with 270 additions and 40 deletions
@@ -16,7 +16,10 @@ class GetChatCache extends SimpleCache<GetChatResponse> {
GetChatParams(
lookIntoFuture: GetChatParamsSwitch.off,
setReadMarker: GetChatParamsSwitch.on,
limit: 200,
// Small initial page; also the per-chat offline snapshot written to
// localstore. Older messages are paged in on scroll-up via
// GetChatHistory. Keep in sync with ChatBloc's _kInitialPageSize.
limit: 50,
),
).run(),
fromJson: GetChatResponse.fromJson,