Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Infinite Scrolling Optimization and Swipe-to-Refresh for Notifications Inbox Screen #85

Merged
merged 6 commits into from
Jan 31, 2025

Conversation

HamzaIsrar12
Copy link

@HamzaIsrar12 HamzaIsrar12 commented Jan 20, 2025

Description

LEARNER-10364

  • Optimized Infinite Scrolling:

    • Checks if more items should be loaded in the LazyList based on visible indices and dynamic item sizes.
    • Triggers loading when visible item indices change or all items fit on the screen.
  • Swipe-to-Refresh Implementation:

    • Added pull-to-refresh functionality to the Notifications Inbox screen for seamless updates.
    • On pull-to-refresh, retain existing notifications until new data is fetched successfully. Show an error message toast if the fetch fails.
  • UI States and Messages:

    • No error message when unable to fetch notifications count or mark notifications as seen (background operations).
    • Show the empty state when there are no notifications.
    • Show the Network error state when fetching the very first page fails due to network problems.
    • Show the Server error state when fetching the very first page fails due to an issue on the server.
    • On a second-page fetch error, show a circular progress bar at the bottom of the list and an error message toast.
    • On "mark as read" or "mark all as read" failure, show an error message toast.

@HamzaIsrar12 HamzaIsrar12 self-assigned this Jan 20, 2025
Copy link

@omerhabib26 omerhabib26 left a comment

Choose a reason for hiding this comment

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

only a minor nit

HamzaIsrar12 and others added 3 commits January 24, 2025 15:52
Copy link

@omerhabib26 omerhabib26 left a comment

Choose a reason for hiding this comment

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

Only a minor nit

Fixes: LEARNER-10364
@HamzaIsrar12 HamzaIsrar12 merged commit 7523f86 into 2U/develop Jan 31, 2025
3 checks passed
@HamzaIsrar12 HamzaIsrar12 deleted the hamza/LEARNER-10364 branch January 31, 2025 15:32
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