1 Commits

Author SHA1 Message Date
a589401158 Add pull-to-refresh with loading states
Implemented pull-to-refresh functionality across all main screens:

- Home screen: Added RefreshControl to beneficiaries FlatList
  - Separated isLoading (initial load) from isRefreshing (pull-to-refresh)
  - Only show full screen spinner on initial load, not during refresh
  - Pass isRefresh flag to loadBeneficiaries to control loading state

- Chat screen: Added RefreshControl to messages FlatList
  - Reset conversation to initial welcome message on refresh
  - Stop TTS and voice input during refresh to prevent conflicts
  - Clear state cleanly before resetting messages

- Profile screen: Added RefreshControl to ScrollView
  - Reload avatar from cloud/cache on refresh
  - Graceful error handling if avatar load fails

- Dashboard screen: Enhanced visual feedback on refresh
  - Show ActivityIndicator in refresh button when refreshing
  - Disable refresh button during refresh to prevent rapid-fire
  - Reset isRefreshing state on WebView load completion

Added comprehensive tests (23 test cases) covering:
- RefreshControl integration on all screens
- Loading state differentiation (isLoading vs isRefreshing)
- Error handling during refresh
- User experience (platform colors, visual feedback)
- Integration verification for all implementations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-31 16:28:40 -08:00