Skip to content

Conversation

@yesshreyes
Copy link
Collaborator

No description provided.

Key changes:
- Added `TopicPagingSource` to handle fetching paged data.
- Modified `TopicViewModel` to use `Pager` for fetching and managing paged data.
- Updated `TopicList` and `TopicScreenUI` to consume `LazyPagingItems`.
- Added new dependencies for multiplatform paging (`cashapp-paging-common`, `cashapp-paging-compose-common`).
- Updated `TopicRepository` with `getTopicsPage` function to support paged fetching.
- Updated previews to reflect the new paged data structure.
Key changes:
- Added `TopicPagingSource` to handle fetching paged data.
- Modified `TopicViewModel` to use `Pager` for fetching and managing paged data.
- Updated `TopicList` and `TopicScreenUI` to consume `LazyPagingItems`.
- Added new dependencies for multiplatform paging (`cashapp-paging-common`, `cashapp-paging-compose-common`).
- Updated `TopicRepository` with `getTopicsPage` function to support paged fetching.
- Updated previews to reflect the new paged data structure.
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.

As discussed in slack. Please review the PR yourself and improve quality overall, remove redundant code after switching to new implementation.

…ving the intermediate `UiState` and `fetchTopicList` logic.

- Modify `TopicRepository.getTopicsPage` to return `List<TopicUi>`.
- Make `TopicRepository.getTopics` private as it's now an internal detail.
- Update UI components (`TopicList`, `TopicCard`, `TopicScreenUI`) and preview utils to reflect these changes.
- Adjust `TopicPagingSource` to work with `TopicUi`.
- Rename `ItemTopic` to `TopicUi` and move it to a separate file.
- Move `TopicPagingSource` to the data layer.
- Update `TopicViewModel`, `TopicList`, `TopicCard`, and `TopicScreen` to use the new `Topic` data class.
- Adjust `TopicRepository` to return `Topic` objects.
- Enhance `TopicPagingSource`'s `getRefreshKey` logic.
- Update `PreviewUtils` to use the renamed `Topic` class.
- Remove unused Android Paging dependency.
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.

Review my commit, do you believe this is what you needed?
24f240e

@yesshreyes
Copy link
Collaborator Author

Review my commit, do you believe this is what you needed? 24f240e

Reviewed.

@yesshreyes yesshreyes merged commit 34b96f5 into master Jul 14, 2025
1 check passed
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.

2 participants