Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix deeplink when app is suspended (#812)

* Update Navigation.tsx

Missing If statement within the Deep Linking function that broke the ability to change state to hometab

* Updated the function correctly, I missed a bracket

* format

* add pre-existing home state when unspecified path

* Remove unnecessary log

---------

Co-authored-by: Gai <68623807+that-gai-gai@users.noreply.github.com>
Co-authored-by: that-gai-gai <kgai@protonmail.com>

authored by

Ansh
Gai
that-gai-gai
and committed by
GitHub
3cb8169a 421f29ad

+16 -2
+10 -1
src/Navigation.tsx
··· 410 410 if (name === 'Notifications') { 411 411 return buildStateObject('NotificationsTab', 'Notifications', params) 412 412 } 413 - return buildStateObject('HomeTab', name, params) 413 + if (name === 'Home') { 414 + return buildStateObject('HomeTab', 'Home', params) 415 + } 416 + // if the path is something else, like a post, profile, or even settings, we need to initialize the home tab as pre-existing state otherwise the back button will not work 417 + return buildStateObject('HomeTab', name, params, [ 418 + { 419 + name: 'Home', 420 + params: {}, 421 + }, 422 + ]) 414 423 } else { 415 424 return buildStateObject('Flat', name, params) 416 425 }
+6 -1
src/lib/routes/helpers.ts
··· 55 55 return TabState.Outside 56 56 } 57 57 58 + type ExistingState = { 59 + name: string 60 + params?: RouteParams 61 + } 58 62 export function buildStateObject( 59 63 stack: string, 60 64 route: string, 61 65 params: RouteParams, 66 + state: ExistingState[] = [], 62 67 ) { 63 68 if (stack === 'Flat') { 64 69 return { ··· 70 75 { 71 76 name: stack, 72 77 state: { 73 - routes: [{name: route, params}], 78 + routes: [...state, {name: route, params}], 74 79 }, 75 80 }, 76 81 ],