Ensure /start
navigates to /starter-pack
when clicking a link internally
#4745
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
without whitespace
Why
Links that lead to
/start
should just navigate to/starter-pack
when clicking them within the app. Although the current behavior is generally fine, it is possible to trigger this crash with the current behavior:<RNSNavigationController: 0x111824200> is pushing the same view controller instance (<RNSScreen: 0x159982600>) more than once which is not supported and is most likely an error in the application : xyz.blueskyweb.app
. It seems to only affect iOS users as well.How
Whenever we call
convertBskyAppUrlIfNeeded()
, we can add a check to replace/start/
with/starter-pack/
if the link is indeed pointing toward/start/
. While this is generally not needed after #4699 (which handles SP embeds natively instead of leaving them as external links), it would be good to ensure that even if someone pastes in a raw/start/
link that it gets handled nicely.Test Plan
Weirdly, it took me a long time to actually repro the crash. It turns out you need to do the following to reproduce it (at least, this is how I was able to)
main
)After this change, test the same. The crash no longer reproduces.