Skip to content

feature/enhance_compose_stability#20

Merged
dev-ali-mansour merged 6 commits intodevelopfrom
feature/enhance_compose_stability
Feb 14, 2026
Merged

feature/enhance_compose_stability#20
dev-ali-mansour merged 6 commits intodevelopfrom
feature/enhance_compose_stability

Conversation

@dev-ali-mansour
Copy link
Owner

No description provided.

…pose

- Add `@Stable` annotation to `HomeViewModel`, `NewTaskViewModel`, `UpdateTaskViewModel`, `TaskDetailsViewModel`, and `SelectedTaskViewModel` for better Compose performance.
- Move `koinViewModel()` calls from function bodies to default parameter values in `AppNavHost`, `HomeScreen`, `NewTaskScreen`, `UpdateTaskScreen`, and `TaskDetailsScreen` to improve testability and follow best practices.
- Format `when` blocks across various ViewModels and Screens to use consistent bracing.
- Reorganize imports in multiple UI files.
Introduces a reusable `CommonTopAppBar` Composable using Material 3 `CenterAlignedTopAppBar`. Features include support for a title, an optional back/close navigation icon, and custom actions.
Refactors the UI architecture to use `Scaffold` within individual feature screens (`HomeScreen`, `NewTaskScreen`, `UpdateTaskScreen`, and `TaskDetailsScreen`) instead of passing composable setters through `AppNavHost`.

Specific changes:
*   Removed `onSetTopBar` and `onSetFab` callbacks from `AppNavHost` and related screen composables.
*   Introduced `CommonTopAppBar` to standardize the top bar across different screens.
*   Updated `MainApp` to remove state tracking for dynamic top bar and FAB content.
*   Added `consumeWindowInsets` in `MainApp` to correctly handle padding in the navigation host.
*   Added `add_task` string resource for better localization and accessibility.
…pose

- Add `@Stable` annotation to `HomeViewModel`, `NewTaskViewModel`, `UpdateTaskViewModel`, `TaskDetailsViewModel`, and `SelectedTaskViewModel` for better Compose performance.
- Move `koinViewModel()` calls from function bodies to default parameter values in `AppNavHost`, `HomeScreen`, `NewTaskScreen`, `UpdateTaskScreen`, and `TaskDetailsScreen` to improve testability and follow best practices.
- Format `when` blocks across various ViewModels and Screens to use consistent bracing.
- Reorganize imports in multiple UI files.
…app logic

- Removes `onSetTopBar` and `onSetFab` parameters from `AppNavHost` and its internal screen destinations.
- Implements `OnBackPress`, `OnExitDialogConfirmed`, and `OnExitDialogCancelled` event handling in `HomeViewModel`.
- Adds `ExitApp` effect handling in `HomeScreen` to close the activity and terminate the process.
@dev-ali-mansour dev-ali-mansour merged commit 458fad8 into develop Feb 14, 2026
2 checks passed
@dev-ali-mansour dev-ali-mansour deleted the feature/enhance_compose_stability branch February 14, 2026 16:45
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