Skip to content

Commit

Permalink
fix: optimize performance test
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictb committed Aug 18, 2024
1 parent ec97122 commit f39b704
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/Composer/index.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,10 @@ function Composer(
const {inputCallbackRef, inputRef: autoFocusInputRef} = useAutoFocusInput();

useEffect(() => {
if (!autoFocus) {
inputCallbackRef(null);
if (autoFocus === !!autoFocusInputRef.current) {
return;
}
if (textInput.current && !autoFocusInputRef.current) {
inputCallbackRef(textInput.current);
}
inputCallbackRef(autoFocus ? textInput.current : null);
}, [autoFocus, inputCallbackRef, autoFocusInputRef]);

/**
Expand Down

0 comments on commit f39b704

Please sign in to comment.