mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 06:01:49 +01:00
Onboarding screen tweaks
- Opposite transition when going back a step - Don't allow skipping (I don't want to deal with an unset storage location in other places)
This commit is contained in:
parent
3a0b3de175
commit
cc56fde9fe
@ -73,8 +73,6 @@ fun OnboardingScreen(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rejectText = stringResource(MR.strings.onboarding_action_skip),
|
|
||||||
onRejectClick = onComplete,
|
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@ -87,7 +85,7 @@ fun OnboardingScreen(
|
|||||||
targetState = currentStep,
|
targetState = currentStep,
|
||||||
transitionSpec = {
|
transitionSpec = {
|
||||||
materialSharedAxisX(
|
materialSharedAxisX(
|
||||||
forward = true,
|
forward = targetState > initialState,
|
||||||
slideDistance = slideDistance,
|
slideDistance = slideDistance,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
@ -38,8 +38,8 @@ fun InfoScreen(
|
|||||||
subtitleText: String,
|
subtitleText: String,
|
||||||
acceptText: String,
|
acceptText: String,
|
||||||
onAcceptClick: () -> Unit,
|
onAcceptClick: () -> Unit,
|
||||||
rejectText: String,
|
rejectText: String? = null,
|
||||||
onRejectClick: () -> Unit,
|
onRejectClick: (() -> Unit)? = null,
|
||||||
content: @Composable ColumnScope.() -> Unit,
|
content: @Composable ColumnScope.() -> Unit,
|
||||||
) {
|
) {
|
||||||
Scaffold(
|
Scaffold(
|
||||||
@ -69,11 +69,13 @@ fun InfoScreen(
|
|||||||
) {
|
) {
|
||||||
Text(text = acceptText)
|
Text(text = acceptText)
|
||||||
}
|
}
|
||||||
OutlinedButton(
|
if (rejectText != null && onRejectClick != null) {
|
||||||
modifier = Modifier.fillMaxWidth(),
|
OutlinedButton(
|
||||||
onClick = onRejectClick,
|
modifier = Modifier.fillMaxWidth(),
|
||||||
) {
|
onClick = onRejectClick,
|
||||||
Text(text = rejectText)
|
) {
|
||||||
|
Text(text = rejectText)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user