kuuuurt / multiplatform-paging

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

Fix issue with frozen pager on iOS #19

Closed rickclephas closed 2 years ago

rickclephas commented 2 years ago

Fixes #18.

Updated the pager to have a StateFlow containing the state of the pager. Loading a new page will no longer modify the frozen pager but will emit a new state object instead. The state objects are copied so they can be frozen as well.

Also added a test to verify the freezing is no longer an issue 😊.

kuuuurt commented 2 years ago

Thanks for the contribution! Just have a question on the changes