P2 Stream D: ThemeSelectionScreen (replaces ThemePickerDialog)
Full-screen theme picker with 11 theme previews matching iOS ThemeSelectionView. Live preview on tap. Old dialog deleted and call-sites migrated to the new route. Tests use the state-logic fallback pattern (plain kotlin.test rather than runComposeUiTest) because Compose UI testing in commonTest for this KMP project is flaky — the existing ThemeManager uses mutableStateOf plus platform-backed ThemeStorage, which doesn't play well with the recomposer on iosSimulatorArm64. The behavior under test is identical: helpers in ThemeSelectionScreenState drive the same code paths the composable invokes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,7 @@ import com.tt.honeyDue.ui.screens.TasksScreen
|
||||
import com.tt.honeyDue.ui.screens.VerifyEmailScreen
|
||||
import com.tt.honeyDue.ui.screens.VerifyResetCodeScreen
|
||||
import com.tt.honeyDue.ui.screens.onboarding.OnboardingScreen
|
||||
import com.tt.honeyDue.ui.screens.theme.ThemeSelectionScreen
|
||||
import com.tt.honeyDue.viewmodel.OnboardingViewModel
|
||||
import com.tt.honeyDue.viewmodel.PasswordResetViewModel
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
@@ -706,6 +707,9 @@ fun App(
|
||||
onNavigateToNotificationPreferences = {
|
||||
navController.navigate(NotificationPreferencesRoute)
|
||||
},
|
||||
onNavigateToThemeSelection = {
|
||||
navController.navigate(ThemeSelectionRoute)
|
||||
},
|
||||
onNavigateToUpgrade = {
|
||||
navController.navigate(UpgradeRoute)
|
||||
}
|
||||
@@ -719,6 +723,14 @@ fun App(
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
composable<ThemeSelectionRoute> {
|
||||
ThemeSelectionScreen(
|
||||
onNavigateBack = {
|
||||
navController.popBackStack()
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user