about summary refs log tree commit diff
path: root/src/view/shell/index.web.tsx
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-10-11 16:42:43 -0700
committerGitHub <noreply@github.com>2024-10-11 16:42:43 -0700
commit8e16427497dc1d0b288e889c4a4a72abbfdf5a7e (patch)
treee0c42553ccd5a09f36904d9a1f5c1e86fa89b61f /src/view/shell/index.web.tsx
parenteaba6584198eac50e18cdaaa0fb41ac601990519 (diff)
downloadvoidsky-8e16427497dc1d0b288e889c4a4a72abbfdf5a7e.tar.zst
Move composer open shortcut to shell (#5723)
* move composer shortcut hook

* put intent handler in same place

* dont allow shortcuts if no session

* revert change
Diffstat (limited to 'src/view/shell/index.web.tsx')
-rw-r--r--src/view/shell/index.web.tsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/view/shell/index.web.tsx b/src/view/shell/index.web.tsx
index 9dab23671..2c7cd7b08 100644
--- a/src/view/shell/index.web.tsx
+++ b/src/view/shell/index.web.tsx
@@ -4,12 +4,14 @@ import {msg} from '@lingui/macro'
 import {useLingui} from '@lingui/react'
 import {useNavigation} from '@react-navigation/native'
 
+import {useColorSchemeStyle} from '#/lib/hooks/useColorSchemeStyle'
+import {useIntentHandler} from '#/lib/hooks/useIntentHandler'
 import {useWebBodyScrollLock} from '#/lib/hooks/useWebBodyScrollLock'
+import {NavigationProp} from '#/lib/routes/types'
+import {colors, s} from '#/lib/styles'
 import {useIsDrawerOpen, useSetDrawerOpen} from '#/state/shell'
+import {useComposerKeyboardShortcut} from '#/state/shell/composer/useComposerKeyboardShortcut'
 import {useCloseAllActiveElements} from '#/state/util'
-import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle'
-import {NavigationProp} from 'lib/routes/types'
-import {colors, s} from 'lib/styles'
 import {MutedWordsDialog} from '#/components/dialogs/MutedWords'
 import {SigninDialog} from '#/components/dialogs/Signin'
 import {Outlet as PortalOutlet} from '#/components/Portal'
@@ -30,6 +32,8 @@ function ShellInner() {
   const {_} = useLingui()
 
   useWebBodyScrollLock(isDrawerOpen)
+  useComposerKeyboardShortcut()
+  useIntentHandler()
 
   useEffect(() => {
     const unsubscribe = navigator.addListener('state', () => {