only check reserved handles for bsky.social, fix test

This commit is contained in:
Samuel Newman
2025-07-03 14:53:56 +03:00
parent 64aa88e8d9
commit a55992c776
4 changed files with 18 additions and 9 deletions
+6 -2
View File
@@ -9,6 +9,7 @@ import Animated, {
import {msg, Plural, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {BSKY_SERVICE_HANDLE_ENDSWITH} from '#/lib/constants'
import {
createFullHandle,
isHandleReserved,
@@ -60,7 +61,10 @@ export function StepHandle() {
return
}
if (isHandleReserved(handle)) {
if (
state.userDomain === BSKY_SERVICE_HANDLE_ENDSWITH &&
isHandleReserved(handle)
) {
dispatch({
type: 'setError',
value: _(msg`That username is not available`),
@@ -147,7 +151,7 @@ export function StepHandle() {
// replace em dash with double hyphen to fix iOS behaviour
setDraftValue(val.replaceAll('—', '--'))
}}
label="alice.bsky.social"
label={`alice${state.userDomain}`}
defaultValue={draftValue}
autoCapitalize="none"
autoCorrect={false}