Skip to content

Refactor AppSettings dialogs and simplify state management - #366

Merged
T31n merged 1 commit into
masterfrom
no-state-class-holder-dialog
Jun 5, 2026
Merged

T31n merged 1 commit into
masterfrom
no-state-class-holder-dialog

Conversation

@T31n

@T31n T31n commented Jun 5, 2026

Copy link
Copy Markdown
Owner

This change removes dedicated state classes for the app settings, shortcut, and template dialogs, replacing them with local state management within the composables. It also refactors how app settings are added by passing the AppSetting model directly through the ViewModel and Use Case.

  • Removed AppSettingDialogState, ShortcutDialogState, and TemplateDialogState.
  • Moved dialog components to the com.android.geto.feature.appsettings.dialog package and refactored them to use remember and mutableStateOf for UI state.
  • Updated AppSettingsViewModel and AddAppSettingUseCase to accept the AppSetting domain model instead of individual field parameters.
  • Simplified AppSettingsScreen by replacing state holder objects with simple boolean flags for dialog visibility.
  • Refactored dialog interaction logic to use standard callback patterns for better separation of concerns.

This change removes dedicated state classes for the app settings, shortcut, and template dialogs, replacing them with local state management within the composables. It also refactors how app settings are added by passing the `AppSetting` model directly through the ViewModel and Use Case.

- Removed `AppSettingDialogState`, `ShortcutDialogState`, and `TemplateDialogState`.
- Moved dialog components to the `com.android.geto.feature.appsettings.dialog` package and refactored them to use `remember` and `mutableStateOf` for UI state.
- Updated `AppSettingsViewModel` and `AddAppSettingUseCase` to accept the `AppSetting` domain model instead of individual field parameters.
- Simplified `AppSettingsScreen` by replacing state holder objects with simple boolean flags for dialog visibility.
- Refactored dialog interaction logic to use standard callback patterns for better separation of concerns.
@T31n
T31n merged commit 75080f0 into master Jun 5, 2026
2 checks passed
@T31n
T31n deleted the no-state-class-holder-dialog branch June 5, 2026 04:27
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.

1 participant