feat: character state management with ViewModel (Closes #23) #60

Merged
shahondin1624 merged 1 commits from feature/issue-23-character-viewmodel into main 2026-03-13 13:33:44 +01:00

Summary

  • New CharacterViewModel with ShadowrunCharacter as observable StateFlow
  • Replace val character = EXAMPLE_CHARACTER with ViewModel state via collectAsState()
  • All composables now observe ViewModel state reactively
  • Uses viewModel { } factory for multiplatform compatibility

Closes #23

## Summary - New `CharacterViewModel` with `ShadowrunCharacter` as observable `StateFlow` - Replace `val character = EXAMPLE_CHARACTER` with ViewModel state via `collectAsState()` - All composables now observe ViewModel state reactively - Uses `viewModel { }` factory for multiplatform compatibility Closes #23
shahondin1624 added 1 commit 2026-03-13 13:33:38 +01:00
Add CharacterViewModel holding ShadowrunCharacter as observable
StateFlow. Replace direct EXAMPLE_CHARACTER usage in App.kt with
ViewModel state collected via collectAsState(). All composables now
observe ViewModel state for reactive updates. Foundation for editing
stories 6.2-6.6.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
shahondin1624 merged commit 5111b6e066 into main 2026-03-13 13:33:44 +01:00
shahondin1624 deleted branch feature/issue-23-character-viewmodel 2026-03-13 13:33:45 +01:00
Sign in to join this conversation.