This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
[C-1515] Allow repeat pushes via useNavigation inside nested navigator #2280
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amendelsohn
approved these changes
Nov 17, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah so that's what was happening. Nice!
const parent = navigator.getParent() | ||
|
||
if (!parent) { | ||
return undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we return navigator
in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's safer to have the consumer explicitly check that there is a result, let me fix up the types so that consumers are forced to check
sliptype
added a commit
that referenced
this pull request
Nov 17, 2022
#2280) * Allow repeat pushes via useNavigation inside nested navigator * Improve types
audius-infra
pushed a commit
that referenced
this pull request
Nov 19, 2022
[33185d6] Fix locks again (#2288) Dylan Jeffers [05b21ce] [C-1505 C-1507 C-1510 C-1511 C-1512] Address Design-QA round 2 (#2285) Dylan Jeffers [19e4751] [PAY-731] Update streaming logic for premium content (#2282) Saliou Diallo [29d1c42] Hide tip tile when no tips (#2284) Sebastian Klingler [8507212] [C-1399] Fix chromecast (#2283) Sebastian Klingler [2853ca3] [C-1239] Fix bottom-tab-bar highlighting (#2281) Dylan Jeffers [8d72c34] [PAY-724] Special Error Treatment and libs/sdk bump to 1.0.23 (#2279) Marcus Pasell [c9eb18d] [C-1515] Allow repeat pushes via useNavigation inside nested navigator (#2280) Sebastian Klingler [86d42af] Wait for backend account for feature (#2269) Marcus Pasell [d3b7c45] [C-1496 C-1497 C-1498,C-1499 C-1501 C-1502 C-1503] Address Design-QA (#2278) Dylan Jeffers [420a7cc] Actually pause audio when AudioPlayer pauses (#2277) Sebastian Klingler [cfc4379] Fix various lock files (#2276) Dylan Jeffers [b6db356] [C-1495] Bump target api to 31 (#2275) Sebastian Klingler [d87f2a0] [C-1419][C-1073] Offline download and playback for collections (#2253) Andrew Mendelsohn [5d5b035] [C-1494] Listens not being recorded properly? (#2274) Sebastian Klingler [3e01fba] [C-1465] Address mobile upload tech debt (#2270) Dylan Jeffers [2721946] Fix makeStyles types (#2268) Andrew Mendelsohn [8dd185b] [C-1493] Add script to update @audius/sdk (#2271) Dylan Jeffers [2bab668] Read subscriptions from discovery behind feature flag (#2258) Michelle Brier [b2ff68a] Fix mobile seek (#2273) Sebastian Klingler [40e0c14] [Flare-120] Avoid hitting notification settings on each session (#2262) Raymond Jacobson [cc9a880] Bump stems limit from 5 to 10 (#2272) Raymond Jacobson [4c82079] [C-981] Add suggested follows to feed if empty (#2231) Raymond Jacobson [493f0d1] [C-1482] Fix visualizer on mp3 stream (#2259) Raymond Jacobson [336daf9] [C-1486] Remove mobile-nav-overhaul feature flag (#2264) Dylan Jeffers [fe90c08] [PAY-695] Get signatures for nft-gated premium tracks (#2245) Saliou Diallo [125f905] Fix FFMPEG error (Android build) (#2265) nicoback2 [163a584] hotfix: takeLatest was registering after action already fired (#2266) Marcus Pasell [64bbe4b] [C-1467] Make previous button restart track within 3 seconds (#2263) Sebastian Klingler [c954633] Fix android builds (#2256) Sebastian Klingler [47ecbf8] Add audio preview to share to IG video [C-1464] (#2261) nicoback2 [ba29515] [C-1440 C-1457 C-1458 C-1459] Address mobile upload QA (#2254) Dylan Jeffers [bda3cc6] Create gradient video with ffmpeg [C-1446] [C-1413] (#2250) nicoback2 [cd71ebf] Ensure toasts show below dynamic island (#2257) Sebastian Klingler [6fbf0ad] Update push notificaiton navigation to work when the app is closed (#2255) Kyle Shanks [36f7bc4] [PAY-720] [PAY-721] Stripe OnRamp hotfixes (#2218) Marcus Pasell [3e6e801] Fix playTrack test (#2252) Sebastian Klingler
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Pushing via
useNavigation
inside a nested navigator (such as a tab navigator inside a stack navigator) was deduping any subsequent pushes to that same screen because thetransitionEnd
handler was being attached on the inner navigator instead of the stack navigatorgetNearestStackNavigator
utilitytransitionEnd
handler to the nearest stack instead of the nearest navigatorDragons
Slight perf implications. I considered computing the nearest stack navigator outside of the
performCustomPush
function but that would mean every instance of useNavigation is doing that work. I think computing it insideperformCustomPush
is better and in most cases it will only need to traverse one level up the navigation hierarchy anywayHow Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.
How will this change be monitored?
For features that are critical or could fail silently please describe the monitoring/alerting being added.
Feature Flags
Are all new features properly feature flagged? Describe added feature flags.