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>
This commit is contained in:
		
							parent
							
								
									421f29ad98
								
							
						
					
					
						commit
						3cb8169a4f
					
				
					 2 changed files with 16 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -55,10 +55,15 @@ export function getTabState(state: State | undefined, tab: string): TabState {
 | 
			
		|||
  return TabState.Outside
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type ExistingState = {
 | 
			
		||||
  name: string
 | 
			
		||||
  params?: RouteParams
 | 
			
		||||
}
 | 
			
		||||
export function buildStateObject(
 | 
			
		||||
  stack: string,
 | 
			
		||||
  route: string,
 | 
			
		||||
  params: RouteParams,
 | 
			
		||||
  state: ExistingState[] = [],
 | 
			
		||||
) {
 | 
			
		||||
  if (stack === 'Flat') {
 | 
			
		||||
    return {
 | 
			
		||||
| 
						 | 
				
			
			@ -70,7 +75,7 @@ export function buildStateObject(
 | 
			
		|||
      {
 | 
			
		||||
        name: stack,
 | 
			
		||||
        state: {
 | 
			
		||||
          routes: [{name: route, params}],
 | 
			
		||||
          routes: [...state, {name: route, params}],
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    ],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue