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