rm timeout

This commit is contained in:
Hailey
2024-06-23 03:32:00 -07:00
parent 1bf1c4d8e6
commit c25e942d8d
+1 -13
View File
@@ -85,18 +85,7 @@ export const TextInput = forwardRef(function TextInputImpl(
const pastSuggestedUris = useRef(new Set<string>())
const prevDetectedUris = useRef(new Map<string, LinkFacetMatch>())
const onChangeText = useCallback(
(newText: string) => {
/*
* This is a hack to bump the rendering of our styled
* `textDecorated` to _after_ whatever processing is happening
* within the `PasteInput` library. Without this, the elements in
* `textDecorated` are not correctly painted to screen.
*
* NB: we tried a `0` timeout as well, but only positive values worked.
*
* @see https://github.com/bluesky-social/social-app/issues/929
*/
setTimeout(async () => {
async (newText: string) => {
const mayBePaste = newText.length > prevLength.current + 1
const newRt = new RichText({text: newText})
@@ -149,7 +138,6 @@ export const TextInput = forwardRef(function TextInputImpl(
onNewLink(suggestedUri)
}
prevLength.current = newText.length
}, 1)
},
[setRichText, autocompletePrefix, onPhotoPasted, onNewLink],
)