about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-18 11:40:12 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-18 11:40:12 -0600
commit0ac6c0ff6148e8a86b35097f1a649d241a701e69 (patch)
tree183d4526129d941f35a5ffd02c47d50dc91a7717 /src
parent368286ad67436e379324be9f81f9e2949ebff12c (diff)
downloadvoidsky-0ac6c0ff6148e8a86b35097f1a649d241a701e69.tar.zst
Add long press newtab to footer nav
Diffstat (limited to 'src')
-rw-r--r--src/view/shell/mobile/index.tsx9
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