LoadMoreHandler

fun LoadMoreHandler(lazyListState: LazyListState, threshold: () -> Int = { lazyListState.layoutInfo.visibleItemsInfo.size / 2 }, loadMore: () -> Unit)

Handler to notify that more items should be loaded when the user scrolls to the end of the list.

Parameters

lazyListState

The LazyListState used to control scrolling.

threshold

The number if items to check before reaching the end of the list. Default is half of the visible items.

loadMore

The callback to load more items.


fun LoadMoreHandler(listState: LazyListState, loadMoreThreshold: Int = 3, loadMore: () -> Unit)

Deprecated

This function is deprecated. Use the one with a lambda for loadMoreThreshold instead.

Replace with

import io.getstream.chat.android.compose.handlers.LoadMoreHandler
LoadMoreHandler(listState, { loadMoreThreshold }, loadMore)

Handler to notify more items should be loaded when the user scrolls to the end of the list.

Parameters

listState

The state of the list used to control scrolling.

loadMoreThreshold

The number if items before the end of the list. Default is 3.

loadMore

Handler for load more action.