Skip to content

Commit

Permalink
Remove hack floating-nav hack in SceneWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
samholmes committed Jun 19, 2024
1 parent 5e151c5 commit 54ca571
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/components/common/SceneWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,22 +228,6 @@ function SceneWrapperComponent(props: SceneWrapperProps): JSX.Element {
}
})

/*
Hack to force `keyboardAwareStyle` to update from keyboard change during
scene transitions. As of react-native-reanimated v3.12.0, there is a bug
where if the keyboard is up before a scene transition starts (caused by
tapping the back button), then the `keyboardHeightDiff` value will change
but the style won't be applied to the scene based ont he keybaordHeightDiff.
There must be some race condition that occurs during the transition that
is resolvable by forcing the `keyboardHeightDiff` value to change after
the transition is complete.
*/
useFocusEffect(() => {
setTimeout(() => {
keyboardHeightDiff.value = keyboardHeightDiff.value + 0.000001
}, 1)
})

// If function children, the caller handles the insets and overscroll
const memoizedChildren = useMemo(() => (typeof children === 'function' ? children(sceneWrapperInfo) : children), [children, sceneWrapperInfo])

Expand Down

0 comments on commit 54ca571

Please sign in to comment.