Remove redundant keyboard handling
This commit is contained in:
@@ -44,7 +44,6 @@ import {
|
|||||||
AutosizedTextarea,
|
AutosizedTextarea,
|
||||||
type AutosizedTextareaProps,
|
type AutosizedTextareaProps,
|
||||||
} from '#/components/forms/AutosizedTextarea'
|
} from '#/components/forms/AutosizedTextarea'
|
||||||
import {useOnKeyboard} from '#/components/hooks/useOnKeyboard'
|
|
||||||
import {Span, Text} from '#/components/Typography'
|
import {Span, Text} from '#/components/Typography'
|
||||||
import {IS_IOS, IS_WEB, IS_WEB_TOUCH_DEVICE} from '#/env'
|
import {IS_IOS, IS_WEB, IS_WEB_TOUCH_DEVICE} from '#/env'
|
||||||
|
|
||||||
@@ -285,8 +284,6 @@ export function Composer({
|
|||||||
const updateAutocompletePosition = useCallback(() => {
|
const updateAutocompletePosition = useCallback(() => {
|
||||||
sift.updatePosition()
|
sift.updatePosition()
|
||||||
}, [sift])
|
}, [sift])
|
||||||
useOnKeyboard('keyboardDidShow', updateAutocompletePosition)
|
|
||||||
useOnKeyboard('keyboardDidHide', updateAutocompletePosition)
|
|
||||||
|
|
||||||
const textContent = (
|
const textContent = (
|
||||||
<Text style={[textStyle, web({whiteSpace: 'pre-wrap'})]}>
|
<Text style={[textStyle, web({whiteSpace: 'pre-wrap'})]}>
|
||||||
@@ -408,13 +405,6 @@ function AutocompleteInner({
|
|||||||
query: activeFacet.value,
|
query: activeFacet.value,
|
||||||
})
|
})
|
||||||
|
|
||||||
const updatePosition = useCallback(() => {
|
|
||||||
sift.updatePosition()
|
|
||||||
}, [sift])
|
|
||||||
|
|
||||||
useOnKeyboard('keyboardDidShow', updatePosition)
|
|
||||||
useOnKeyboard('keyboardDidHide', updatePosition)
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (activeFacet?.type === 'emoji' && activeFacet.raw.endsWith(':')) {
|
if (activeFacet?.type === 'emoji' && activeFacet.raw.endsWith(':')) {
|
||||||
if (items?.[0]) {
|
if (items?.[0]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user