Fix memory leak on mobile web navigation
This commit is contained in:
@@ -12,11 +12,7 @@ import {
|
|||||||
TouchableWithoutFeedback,
|
TouchableWithoutFeedback,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import {
|
import {useLinkProps, useNavigation} from '@react-navigation/native'
|
||||||
useLinkProps,
|
|
||||||
useNavigation,
|
|
||||||
StackActions,
|
|
||||||
} from '@react-navigation/native'
|
|
||||||
import {Text} from './text/Text'
|
import {Text} from './text/Text'
|
||||||
import {TypographyVariant} from 'lib/ThemeContext'
|
import {TypographyVariant} from 'lib/ThemeContext'
|
||||||
import {NavigationProp} from 'lib/routes/types'
|
import {NavigationProp} from 'lib/routes/types'
|
||||||
@@ -327,9 +323,8 @@ function onPressInner(
|
|||||||
Linking.openURL(href)
|
Linking.openURL(href)
|
||||||
} else {
|
} else {
|
||||||
closeModal() // close any active modals
|
closeModal() // close any active modals
|
||||||
|
|
||||||
// @ts-ignore we're not able to type check on this one -prf
|
// @ts-ignore we're not able to type check on this one -prf
|
||||||
navigation.dispatch(StackActions.push(...router.matchPath(href)))
|
navigation.navigate(...router.matchPath(href))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user