-
-
Notifications
You must be signed in to change notification settings - Fork 14
Redirect to the same page break pull-to-refresh #66
Comments
Thanks for the bug report! I can confirm this is the case and that But for those only using // turbo-ios/Source/Session/Session.swift#248
public func visitableDidRequestRefresh(_ visitable: Visitable) {
guard visitable === topmostVisitable else { return }
refreshing = true
visitable.visitableWillRefresh()
reload()
} The // turbo-ios/Source/Visitable/VisitableViewController.swift
open override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
visitableDelegate?.visitableViewDidAppear(self)
} I'm not sure yet if that's a bug in turbo-ios or being caused by Turbo Navigator without digging in more. If you have any ideas please let me know! |
Hmm, I think I might see what's going on. It looks like I'm not entirely sure what the fix is here, to be honest. I think turbo-ios might have to change how |
Confirmed. Applying the following diff presents the modals in a full screen context. Which then calls the right callback. diff --git a/Sources/TurboNavigator.swift b/Sources/TurboNavigator.swift
index 4e90bcc..9c41a32 100644
--- a/Sources/TurboNavigator.swift
+++ b/Sources/TurboNavigator.swift
@@ -131,6 +131,7 @@ public class TurboNavigator {
pushOrReplace(on: modalNavigationController, with: controller, via: proposal)
} else {
modalNavigationController.setViewControllers([controller], animated: false)
+ modalNavigationController.modalPresentationStyle = .fullScreen
navigationController.present(modalNavigationController, animated: true)
}
visit(controller, on: modalSession, with: proposal.options) But we can't default that for everyone. So still need some alternate solution. |
You know what is weird, in Hey they use |
Interesting. Any chance you can reproduce this bug in the demo app for turbo-ios? If so we can rule out Turbo Navigator. |
No, because the demo app doesn't handle "navigating to the same view", it pushes a new view to the stack, and in this case, the refresh still works. |
@lazaronixon, if you apply this patch to turbo-ios, does the same issue occur? |
No, not yet, it's not blinking anymore, but it still breaks the loader. Simulator.Screen.Recording.-.iPhone.15.-.2023-11-21.at.00.07.30.mp4 |
Commenting to remind myself that this issue needs to be fixed before Turbo Navigator is officially upstreamed. |
When I submit a form and use
redirect_to
instead ofrefresh_or_redirect_to
the screen is replaced but the pull-to-refresh stops working. I was expecting that the "navigation to the same screen" was able to handle that.Simulator.Screen.Recording.-.iPhone.15.-.2023-10-20.at.12.41.35.mp4
The text was updated successfully, but these errors were encountered: