MessageTimeline

class MessageTimeline(session: MessageTimelineSession, selfUserId: UserId) : AutoCloseable

A concrete page API for Kotlin and Swift. All pages belong to this generation. Observe invalidated, discard its pages when true, and open another timeline around the visible item's ID and cursor. Close this session when leaving the conversation.

Constructors

Link copied to clipboard
internal constructor(session: MessageTimelineSession, selfUserId: UserId)

Properties

Link copied to clipboard
val invalidated: StateFlow<Boolean>

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
suspend fun load(request: MessageTimelineRequest, limit: Int = 20): MessageTimelineResult

Positive limits are capped at 100. Use 20 for ordinary pages and 60 for initial/around loads.