Skip to content

Conversation

@MihaiCristianCondrea
Copy link
Owner

Motivation

  • Reduce complexity in ScannerScreen by moving the dashboard/analyze UI rendering into a focused composable to improve readability and maintainability.
  • Ensure state collection is lifecycle-aware to match project conventions and avoid collecting flows outside the Activity lifecycle.

Description

  • Introduced a private composable ScannerContent(...) that encapsulates the previous inline Column/AnimatedContent logic and BackHandler handling for the analyze/dashboard switch.
  • Replaced the inline content block in ScannerScreen with a call to ScannerContent(...) and preserved existing event wiring and navigation callbacks.
  • Adjusted the dashboard state type usage to UiStateScreen<DashboardUiState> and removed the direct collectAsState usage in favor of collectAsStateWithLifecycle() for scannerViewModel.uiState.
  • Kept dialog rendering routed via ScannerDialogs(...) and left dialog behavior and events unchanged.

Testing

  • Ran ./gradlew test, which failed due to missing Android SDK configuration (missing ANDROID_HOME or local.properties sdk.dir).

Codex Task

@MihaiCristianCondrea MihaiCristianCondrea merged commit 035a081 into master Jan 27, 2026
1 check passed
@MihaiCristianCondrea MihaiCristianCondrea deleted the codex/refactor-scannerscreen-for-better-readability branch January 27, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants