Files
RSSuper/tasks/native-business-logic-migration/16-implement-android-state-management.md
Michael Freno d346b527e6
Some checks failed
CI - Multi-Platform Native / Build iOS (RSSuper) (push) Has been cancelled
CI - Multi-Platform Native / Build macOS (push) Has been cancelled
CI - Multi-Platform Native / Build Android (push) Has been cancelled
CI - Multi-Platform Native / Build Linux (push) Has been cancelled
CI - Multi-Platform Native / Build Summary (push) Has been cancelled
migration start
2026-03-29 14:12:17 -04:00

42 lines
982 B
Markdown

# 16. Implement Android state management (StateFlow/LiveData)
meta:
id: native-business-logic-migration-16
feature: native-business-logic-migration
priority: P0
depends_on: [native-business-logic-migration-13]
tags: [implementation, android, state-management]
objective:
- Implement reactive state management using StateFlow and LiveData
deliverables:
- FeedRepository.kt
- SubscriptionRepository.kt
- FeedViewModel.kt
- SubscriptionViewModel.kt
- State sealed class
- Error handling types
tests:
- Unit: Test repository methods
- Unit: Test ViewModel state transitions
- Unit: Test StateFlow emission
- Integration: Test UI updates
acceptance_criteria:
- Repositories provide StateFlow
- ViewModels manage state properly
- Error states handled
- Loading states implemented
- Lifecycle-aware updates
validation:
- Run `./gradlew test`
- Test with Espresso for UI updates
notes:
- Use StateFlow for new code
- Use LiveData for UI binding
- Follow Repository pattern