diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-18 11:40:12 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-18 11:40:12 -0600 |
commit | 0ac6c0ff6148e8a86b35097f1a649d241a701e69 (patch) | |
tree | 183d4526129d941f35a5ffd02c47d50dc91a7717 /src | |
parent | 368286ad67436e379324be9f81f9e2949ebff12c (diff) | |
download | voidsky-0ac6c0ff6148e8a86b35097f1a649d241a701e69.tar.zst |
Add long press newtab to footer nav
Diffstat (limited to 'src')
-rw-r--r-- | src/view/shell/mobile/index.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/view/shell/mobile/index.tsx b/src/view/shell/mobile/index.tsx index b4b98e35e..e0f7c07aa 100644 --- a/src/view/shell/mobile/index.tsx +++ b/src/view/shell/mobile/index.tsx @@ -151,6 +151,7 @@ export const MobileShell: React.FC = observer(() => { const onPressMenu = () => setMainMenuActive(true) const onPressNotifications = () => store.nav.navigate('/notifications') const onPressTabs = () => toggleTabsMenu(!isTabsSelectorActive) + const doNewTab = (url: string) => () => store.nav.newTab(url) // tab selector animation // = @@ -320,10 +321,15 @@ export const MobileShell: React.FC = observer(() => { onClose={() => toggleTabsMenu(false)} /> <SafeAreaView style={styles.bottomBar}> - <Btn icon={isAtHome ? 'home-solid' : 'home'} onPress={onPressHome} /> + <Btn + icon={isAtHome ? 'home-solid' : 'home'} + onPress={onPressHome} + onLongPress={doNewTab('/')} + /> <Btn icon={isAtSearch ? 'search-solid' : 'search'} onPress={onPressSearch} + onLongPress={doNewTab('/search')} /> <Btn icon={isTabsSelectorActive ? 'clone' : ['far', 'clone']} @@ -333,6 +339,7 @@ export const MobileShell: React.FC = observer(() => { <Btn icon={isAtNotifications ? 'bell-solid' : 'bell'} onPress={onPressNotifications} + onLongPress={doNewTab('/notifications')} notificationCount={store.me.notificationCount} /> <Btn |