Closed richardagist closed 4 years ago
Put this code on a viewController in a sample app:
override func viewDidAppear(_ animated: Bool) {
class Skippy: UIWorkflowItem<Never>, FlowRepresentable {
static func instance() -> AnyFlowRepresentable { Skippy() }
func shouldLoad() -> Bool { false }
override func viewDidLoad() { title = "Skip" }
override func viewWillAppear(_ animated: Bool) {
proceedInWorkflow()
}
}
class StayPuty: UIWorkflowItem<Never>, FlowRepresentable {
static func instance() -> AnyFlowRepresentable { StayPuty() }
func shouldLoad() -> Bool { true }
override func viewDidLoad() { title = "Stay Put" }
}
let problemWorkflow = Workflow()
.thenPresent(Skippy.self, presentationType: .default, staysInViewStack: .hiddenInitially)
.thenPresent(StayPuty.self)
launchInto(problemWorkflow, withLaunchStyle: .navigationStack)
}
var itWorky = true
Should be fixed in 1.0.6, thanks for catching this!
Describe the bug Setting a .thenPresent to have a hiddenInitially seems to forget to set the proceedInWorkflow when you navigate back the view.
To Reproduce Steps to reproduce the behavior:
Expected behavior Be able to move forward.
Additional context Add any other context about the problem here.
Sample: See comments