kuuuurt / multiplatform-paging

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

Always create new PagingSource on Android. #33

Closed ilmooo closed 1 year ago

ilmooo commented 1 year ago

Always create new PagingSource on Android from pagingSourceFactory. This is required by Android Paging library. Fixes crash caused by common refresh logic changes in 0.6.0 version.

Crash description when refreshing pager with 0.6.0 version of library:

An instance of PagingSource was re-used when Pager expected to create a newinstance. Ensure that the pagingSourceFactory passed to Pager always returns a new instance of PagingSource.