Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ private fun <T : Any> SwipeBackSceneContent(
}
}

PredictiveBackHandler { progressFlow ->
// only intercept back when there is a screen to go back to, otherwise let the activity handle it (exit the app)
PredictiveBackHandler(enabled = previousEntry != null) { progressFlow ->
try {
progressFlow.collect { backEvent ->
if (previousEntry == null) return@collect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fun OnboardingScreen(

val animationScope = rememberCoroutineScope()

BackHandler {
BackHandler(enabled = state.canScrollBackward) {
animationScope.launch {
if (state.canScrollBackward) {
val targetItem = if (isSupported && state.currentItem == 3) 1 else state.currentItem - 1
Expand Down