Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/src/main/java/to/bitkit/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class MainActivity : FragmentActivity() {
val route = navBackEntry.toRoute<StartupRoutes.Slides>()
OnboardingSlidesScreen(
currentTab = route.tab,
isGeoBlocked = appViewModel.isGeoBlocked == true,
onAdvancedSetupClick = { startupNavController.navigate(StartupRoutes.Advanced) },
onCreateClick = {
scope.launch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import to.bitkit.ui.utils.withAccent
@Composable
fun OnboardingSlidesScreen(
currentTab: Int = 0,
isGeoBlocked: Boolean,
onAdvancedSetupClick: () -> Unit,
onCreateClick: () -> Unit,
onRestoreClick: () -> Unit,
Expand Down Expand Up @@ -86,7 +87,7 @@ fun OnboardingSlidesScreen(
title = stringResource(R.string.onboarding__slide1_header),
titleAccentColor = Colors.Purple,
text = stringResource(R.string.onboarding__slide1_text),
disclaimerText = stringResource(R.string.onboarding__slide1_note), // TODO use GeoBlocking state
disclaimerText = stringResource(R.string.onboarding__slide1_note).takeIf { isGeoBlocked },
modifier = Modifier.testTag("Slide1")
)

Expand Down Expand Up @@ -239,6 +240,35 @@ private fun OnboardingViewPreview() {
onAdvancedSetupClick = {},
onCreateClick = {},
onRestoreClick = {},
isGeoBlocked = true
)
}
}

@Preview(showSystemUi = true)
@Composable
private fun OnboardingViewPreview2() {
AppThemeSurface {
OnboardingSlidesScreen(
currentTab = 1,
onAdvancedSetupClick = {},
onCreateClick = {},
onRestoreClick = {},
isGeoBlocked = true
)
}
}

@Preview(showSystemUi = true)
@Composable
private fun OnboardingViewPreview3() {
AppThemeSurface {
OnboardingSlidesScreen(
currentTab = 1,
onAdvancedSetupClick = {},
onCreateClick = {},
onRestoreClick = {},
isGeoBlocked = false
)
}
}