Show tabs when swiping feeds (#1856)
This commit is contained in:
parent
7a55ca6133
commit
c627a766cd
2 changed files with 18 additions and 3 deletions
|
@ -85,6 +85,15 @@ export const HomeScreen = withAuthRequired(
|
|||
store.emitScreenSoftReset()
|
||||
}, [store])
|
||||
|
||||
const onPageScrollStateChanged = React.useCallback(
|
||||
(state: 'idle' | 'dragging' | 'settling') => {
|
||||
if (state === 'dragging') {
|
||||
setMinimalShellMode(false)
|
||||
}
|
||||
},
|
||||
[setMinimalShellMode],
|
||||
)
|
||||
|
||||
const renderTabBar = React.useCallback(
|
||||
(props: RenderTabBarFnProps) => {
|
||||
return (
|
||||
|
@ -113,6 +122,7 @@ export const HomeScreen = withAuthRequired(
|
|||
ref={pagerRef}
|
||||
testID="homeScreen"
|
||||
onPageSelected={onPageSelected}
|
||||
onPageScrollStateChanged={onPageScrollStateChanged}
|
||||
renderTabBar={renderTabBar}
|
||||
tabBarPosition="top">
|
||||
<FeedPage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue