PendingMessagesPagingSource
internal class PendingMessagesPagingSource<RowType : Any>(totalCountQuery: <Error class: unknown class><Long>, pendingCountQuery: <Error class: unknown class><Long>, context: <Error class: unknown class>, pendingQueryProvider: (limit: Long, offset: Long) -> <Error class: unknown class><RowType>, nonPendingQueryProvider: (limit: Long, offset: Long) -> <Error class: unknown class><RowType>, initialOffset: Long = 0, postProcessor: suspend (List<RowType>) -> List<RowType>? = null)
Paging source for conversation messages where pending messages must be exposed as a dedicated leading segment.
This is used by the conversation message pager because the chat UI uses reverseLayout = true: emitting pending messages first in data order renders them at the visual bottom of the chat, close to the composer. A regular single-query paging source cannot keep efficient pending and non-pending SQL queries while also translating Paging's global offsets across that boundary.
Constructors
Link copied to clipboard
constructor(totalCountQuery: <Error class: unknown class><Long>, pendingCountQuery: <Error class: unknown class><Long>, context: <Error class: unknown class>, pendingQueryProvider: (limit: Long, offset: Long) -> <Error class: unknown class><RowType>, nonPendingQueryProvider: (limit: Long, offset: Long) -> <Error class: unknown class><RowType>, initialOffset: Long = 0, postProcessor: suspend (List<RowType>) -> List<RowType>? = null)