kuuuurt / multiplatform-paging

Kotlin Multiplatform library for Pagination
Apache License 2.0
250 stars 22 forks source link

Placeholders support #31

Open cvb941 opened 1 year ago

cvb941 commented 1 year ago

Hello and thanks for the library.

I need to start with a large empty list and load items into it lazily afterward, in order to set the initial scroll position somewhere in the middle.

I noticed that there is an option for placeholders in the PagingConfig class:

PagingConfig(
    pageSize = 10,
    enablePlaceholders = false // Ignored on iOS
)

Is it doing anything currently on Android? As far as I know, it requires setting the itemsBefore and itemsAfter parameters in the androidx.Paging's LoadResult.Page in order to work.