mirror of https://github.com/tooot-app/app
Long press to switch account
This commit is contained in:
parent
bc0c07e785
commit
4ea4e39759
|
@ -4,7 +4,7 @@
|
|||
"native": "220102",
|
||||
"major": 3,
|
||||
"minor": 2,
|
||||
"patch": 1,
|
||||
"patch": 2,
|
||||
"expo": "44.0.0"
|
||||
},
|
||||
"description": "tooot app for Mastodon",
|
||||
|
|
|
@ -33,7 +33,7 @@ dev()
|
|||
sentry()
|
||||
audio()
|
||||
push()
|
||||
enableFreeze()
|
||||
enableFreeze(true)
|
||||
|
||||
const App: React.FC = () => {
|
||||
log('log', 'App', 'rendering App')
|
||||
|
|
|
@ -102,6 +102,19 @@ const ScreenTabs = React.memo(
|
|||
)
|
||||
const composeComponent = useCallback(() => null, [])
|
||||
|
||||
const meListeners = useMemo(
|
||||
() => ({
|
||||
tabLongPress: () => {
|
||||
haptics('Light')
|
||||
//@ts-ignore
|
||||
navigation.navigate('Tab-Me', { screen: 'Tab-Me-Root' })
|
||||
//@ts-ignore
|
||||
navigation.navigate('Tab-Me', { screen: 'Tab-Me-Switch' })
|
||||
}
|
||||
}),
|
||||
[]
|
||||
)
|
||||
|
||||
const previousTab = useSelector(getPreviousTab, () => true)
|
||||
|
||||
const versionUpdate = useSelector(getVersionUpdate)
|
||||
|
@ -128,7 +141,12 @@ const ScreenTabs = React.memo(
|
|||
listeners={composeListeners}
|
||||
/>
|
||||
<Tab.Screen name='Tab-Notifications' component={TabNotifications} />
|
||||
<Tab.Screen name='Tab-Me' component={TabMe} options={tabMeOptions} />
|
||||
<Tab.Screen
|
||||
name='Tab-Me'
|
||||
component={TabMe}
|
||||
options={tabMeOptions}
|
||||
listeners={meListeners}
|
||||
/>
|
||||
</Tab.Navigator>
|
||||
)
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue