remove timeout
This commit is contained in:
@@ -6,9 +6,8 @@ import {
|
||||
useState,
|
||||
} from 'react'
|
||||
import {
|
||||
type NativeSyntheticEvent,
|
||||
Text as RNText,
|
||||
type TextInputSelectionChangeEventData,
|
||||
type TextInputSelectionChangeEvent,
|
||||
View,
|
||||
} from 'react-native'
|
||||
import {AppBskyRichtextFacet, RichText} from '@atproto/api'
|
||||
@@ -145,7 +144,7 @@ export function TextInput({
|
||||
)
|
||||
|
||||
const onSelectionChange = useCallback(
|
||||
(evt: NativeSyntheticEvent<TextInputSelectionChangeEventData>) => {
|
||||
(evt: TextInputSelectionChangeEvent) => {
|
||||
// NOTE we track the input selection using a ref to avoid excessive renders -prf
|
||||
textInputSelection.current = evt.nativeEvent.selection
|
||||
},
|
||||
|
||||
@@ -21,11 +21,7 @@ import {Text} from '#/components/Typography'
|
||||
import {type TextInputProps, type TextInputRef} from './TextInput.types'
|
||||
import {getImageOrVideoFromUri} from './web/uri-to-media'
|
||||
|
||||
const RichTextInput = lazy(async () => {
|
||||
await new Promise(resolve => setTimeout(resolve, 2000))
|
||||
|
||||
return await import('./web/RichTextInputWeb')
|
||||
})
|
||||
const RichTextInput = lazy(() => import('./web/RichTextInputWeb'))
|
||||
|
||||
function FallbackTextInput({
|
||||
ref,
|
||||
|
||||
Reference in New Issue
Block a user