Skip to content

Refactors detail view to use ViewModel - #40

Merged
maiatoday merged 7 commits into
mainfrom
work/detail-view-model
Sep 7, 2025
Merged

Refactors detail view to use ViewModel#40
maiatoday merged 7 commits into
mainfrom
work/detail-view-model

Conversation

@maiatoday

Copy link
Copy Markdown
Collaborator

Refactors the detail view to utilize a WizardViewModel for managing state, improving separation of concerns and testability.

Key changes:

Introduces WizardViewModel to handle UI state, including bitmap processing, color reduction, and embroidery creation.
Updates PatchableDetail composable to use WizardViewModel and collect state using collectAsStateWithLifecycle.
Moves bitmap reduction and embroidery creation logic into the ViewModel.
Adds reset functionality to WizardViewModel to clear the state when a different patchable is selected.
Introduces PatchablePreviewMode enum to handle preview modes.

Introduces `WizardViewModel` to manage the state and logic of the `WizardScreen`.
This change centralizes state management and improves the testability of the screen.

Refactor WizardScreen to use ViewModel

Refactor WizardScreen to use ViewModel

Introduces `WizardViewModel` to manage the state and logic of the `WizardScreen`.
This change centralizes state management and improves the testability of the screen.
@maiatoday maiatoday self-assigned this Sep 7, 2025
@maiatoday

Copy link
Copy Markdown
Collaborator Author

Nop it isn't groundhog day, I merged the previous PR to the wrong branch. You already reviewed it, sorry for the noise

@mariobodemann mariobodemann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks familiar... ;-)

@maiatoday
maiatoday added this pull request to the merge queue Sep 7, 2025
Merged via the queue into main with commit d7de3f2 Sep 7, 2025
1 check passed
@mariobodemann
mariobodemann deleted the work/detail-view-model branch September 14, 2025 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants