Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Abandon does not dismiss SwiftUI Nav stack #204

Closed
1 task done
Tyler-Keith-Thompson opened this issue Jun 10, 2022 · 2 comments · Fixed by #205
Closed
1 task done

[Bug]: Abandon does not dismiss SwiftUI Nav stack #204

Tyler-Keith-Thompson opened this issue Jun 10, 2022 · 2 comments · Fixed by #205
Labels
bug Something isn't working

Comments

@Tyler-Keith-Thompson
Copy link
Collaborator

What happened?

I've got a workflow set up with multiple items, I used the .embedInNavStack() fluent API, but when I call workflow?.abandon() the nav stack doesn't reset. I just stay on the last page.

Version

SwiftCurrent Version: 5.1.4
Xcode Version: 13.4.1
iOS Version: 14+

Relevant code sample

WorkflowView(launchingWith: .init(wrappedValue: appointment)) {
                WorkflowItem(FirstView.self)
                    .presentationType(.navigationLink)
                WorkflowItem(SecondView.self)
                    .presentationType(.navigationLink)
            }
            .embedInNavigationView()

// from inside SecondView
Button("Abandon") {
    workflow?.abandon()
}

Relevant log output

It seems that the body is being published. I suspect we need to listen to calls to `abandon` and then set all `isActive` flags to `false` inside of `WorkflowItemWrapper`

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Tyler-Keith-Thompson Tyler-Keith-Thompson added the bug Something isn't working label Jun 10, 2022
@Tyler-Keith-Thompson
Copy link
Collaborator Author

Modals have a weirder behavior, the view vanishes but the modal stays up.

@Tyler-Keith-Thompson
Copy link
Collaborator Author

Also note: backUpInWorkflow does the right thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant