Commit Graph

2 Commits

Author SHA1 Message Date
Trey t
1d3a06f492 Add comprehensive error handling utilities for all screens
Created reusable error handling components that can be used across all
screens in both Android and iOS apps to show retry/cancel dialogs when
network calls fail.

Android Components:
- ApiResultHandler: Composable that automatically handles ApiResult states
  with loading indicators and error dialogs
- HandleErrors(): Extension function for ApiResult to show error dialogs
  for operations that don't return display data
- Updated ResidencesScreen to import ApiResultHandler

iOS Components:
- ViewStateHandler: SwiftUI view that handles loading/error/success states
  with automatic error alerts
- handleErrors(): View modifier for automatic error monitoring
- Both use the existing ErrorAlertModifier for consistent alerts

Documentation:
- Created ERROR_HANDLING.md with comprehensive usage guide
- Includes examples for data loading and create/update/delete operations
- Migration guide for updating existing screens
- Best practices and testing guidelines

These utilities make it easy to add consistent error handling with retry
functionality to any screen that makes network calls, improving the user
experience across the entire app.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 14:28:09 -06:00
Trey t
992979f113 wip 2025-11-07 15:26:22 -06:00