about summary refs log tree commit diff
path: root/src/view/screens/Profile.tsx
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2023-12-20 17:50:50 +0000
committerGitHub <noreply@github.com>2023-12-20 09:50:50 -0800
commit4a93a5b6adefdf8d27cfbf54833ba50eb8fb2ef9 (patch)
tree1ddb5e43e5c15c99c61b9f97ab550bd1a42fcebd /src/view/screens/Profile.tsx
parent946b2c916308193822a9fb2ea89c8b0f2b54448d (diff)
downloadvoidsky-4a93a5b6adefdf8d27cfbf54833ba50eb8fb2ef9.tar.zst
Invalid handle autocomplete (#2251)
* refactor invalid handle check from a previous PR to use util function

* add invalid handle check to `prefixMatch`
Diffstat (limited to 'src/view/screens/Profile.tsx')
-rw-r--r--src/view/screens/Profile.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx
index f1c648a67..4558ae33d 100644
--- a/src/view/screens/Profile.tsx
+++ b/src/view/screens/Profile.tsx
@@ -39,6 +39,7 @@ import {truncateAndInvalidate} from '#/state/queries/util'
 import {Text} from '#/view/com/util/text/Text'
 import {usePalette} from 'lib/hooks/usePalette'
 import {isNative} from '#/platform/detection'
+import {isInvalidHandle} from '#/lib/strings/handles'
 
 interface SectionRef {
   scrollToTop: () => void
@@ -231,7 +232,7 @@ function ProfileScreenLoaded({
     track('ProfileScreen:PressCompose')
     const mention =
       profile.handle === currentAccount?.handle ||
-      profile.handle === 'handle.invalid'
+      isInvalidHandle(profile.handle)
         ? undefined
         : profile.handle
     openComposer({mention})