Skip to content

Add paging and pull to refresh view states#6

Merged
lmorda merged 1 commit intomainfrom
3-add-paging-and-refresh-to-contacts
Jul 3, 2025
Merged

Add paging and pull to refresh view states#6
lmorda merged 1 commit intomainfrom
3-add-paging-and-refresh-to-contacts

Conversation

@lmorda
Copy link
Copy Markdown
Owner

@lmorda lmorda commented Jul 3, 2025

Linked Issue: Enable pull-to-refresh and pagination on the Contacts screen using mock contact data

Overview

This PR enhances the existing Contacts screen by introducing pull-to-refresh functionality and paging support using mock data.

All functionality continues to use mock data — no backend integration is included yet.

Changes Made

  • ContactsScreen:

    • Added paging support and enabled pull-to-refresh using.
    • Displays a loading indicator at the bottom while new pages load.
  • ContactsViewModel:

    • Introduced ContactsContract sealed interface to manage loading, success, and empty/error states.
    • Emits paged mock data and updates view state accordingly.
  • HomeworkNextPageIndicator:

    • Moved to a shared UI package (ui/common) for reuse across features.

Tests Added

  • ContactsViewModelTest:

  • ContactsScreenTest:

    • Verifies that pull-to-refresh and pagination update the contact list correctly.
    • Confirms that loading indicators appear as expected during interactions.

Notes

  • All functionality in this PR uses mock data — no real data or network integration is performed.

@lmorda lmorda linked an issue Jul 3, 2025 that may be closed by this pull request
@lmorda
Copy link
Copy Markdown
Owner Author

lmorda commented Jul 3, 2025

LGTM! Nice unit tests

@lmorda lmorda merged commit 304439f into main Jul 3, 2025
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.

Add pull-to-refresh and paging to Contacts UI using mock data

1 participant