Invalid handle autocomplete (#2251)
* refactor invalid handle check from a previous PR to use util function * add invalid handle check to `prefixMatch`
This commit is contained in:
parent
946b2c9163
commit
4a93a5b6ad
3 changed files with 6 additions and 3 deletions
|
@ -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})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue