Overview
The course list and notification screens use FlatList but do not implement pull-to-refresh. Users have no way to manually refresh stale data, leading to confusion when their enrolled courses or new notifications do not appear.
Specifications
Features:
- Add
onRefresh and refreshing props to the FlatList on the course list screen
- Add the same to the notification screen
- Trigger the API refetch on pull-to-refresh and show the loading indicator
Tasks:
- Add the
RefreshControl component to both FlatLists
- Connect it to the existing query refetch functions
- Write a test that confirms the refetch is triggered on pull-to-refresh
Impacted Files:
src/screens/course/CourseListScreen.tsx
src/screens/notifications/NotificationsScreen.tsx
Acceptance Criteria
- Pull-to-refresh triggers a fresh API call on both screens
- Loading indicator shown while refreshing
- List updates with new data after refresh
Overview
The course list and notification screens use
FlatListbut do not implement pull-to-refresh. Users have no way to manually refresh stale data, leading to confusion when their enrolled courses or new notifications do not appear.Specifications
Features:
onRefreshandrefreshingprops to the FlatList on the course list screenTasks:
RefreshControlcomponent to both FlatListsImpacted Files:
src/screens/course/CourseListScreen.tsxsrc/screens/notifications/NotificationsScreen.tsxAcceptance Criteria