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

Avoid popping the view controller on refresh if the presentedViewController is nil #226

Open
wants to merge 1 commit into
base: turbo-navigator
Choose a base branch
from

Conversation

reaper
Copy link

@reaper reaper commented Sep 13, 2024

Issue

When triggering a refresh on a view, the application incorrectly redirects back and refreshes the previous view in the navigation stack.

Assumption

If navigationController.presentedViewController is not nil, a modal is assumed to be displayed, and the expected behavior is to pop the view controller and dismiss the modal.

Resolution

Only pop the view controller when presentedViewController is not nil. If presentedViewController is nil, avoid popping the view controller to prevent unintended navigation behavior.

@reaper reaper marked this pull request as ready for review September 13, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant