Skip to content

Conversation

@yesshreyes
Copy link
Collaborator

No description provided.

Copy link
Member

@RajashekarRaju RajashekarRaju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The current in-memory paging approach works for small datasets but isn’t scalable.
    let’s switch to Paging 3 with a PagingSource and Pager so we only fetch 10 docs at a time.

  2. Update the Compose UI to use collectAsLazyPagingItems() and let the library handle load-more, placeholders, retry, and refresh for you.

  3. For multiplatform, we support later, we’ll extract a common TopicPager interface in commonMain with expect/actual implementations Paging 3 on Android and a manual cursor-flow on desktop/iOS.

- Add Android Paging library and Firebase Firestore dependency.
- Create `TopicPager` interface and platform-specific implementations.
- Implement `AndroidPagingTopicPager` using `FirestoreTopicPagingSource`.
- Introduce `Page` data class for paged results.
- Update `TopicList` and `TopicScreen` to consume paged data.
- Integrate Android Paging module into Koin.
- Implement `AndroidPagingTopicPager` using `PagingSource` for Android.
- Introduce `Page`, `Topic`, and `TopicPager` for managing paged data.
- Update `TopicViewModel` to consume data from `TopicPager`.
- Remove manual pagination logic from `TopicViewModel`.
- Move `TopicScreen` and `TopicList` to the `paging` package.
- Add necessary dependencies for Paging and Firestore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants