Skip to content
Merged
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 @@ -384,6 +384,10 @@ private class InnerFlowNavigator<S : FlowStep, R : Parcelable>(
val nextIndex = anchorIndex + 1
if (anchorIndex >= 0 && nextIndex <= currentSteps.lastIndex) {
navigateTo(currentSteps[nextIndex])
} else if (anchorIndex < 0 && currentSteps.isNotEmpty()) {
// Current step was removed from the steps list (e.g. a gate whose condition
// is now met). Navigate to the first remaining step.
navigateTo(currentSteps.first(), popCurrent = true)
} else {
val result = completedResult()
if (result != null) exitWithResult(result)
Expand Down
Loading