Remove Keyboard.dismiss() calls from composer sheet buttons
The sheet presentation handles keyboard dismissal, so these manual calls are unnecessary. https://claude.ai/code/session_011cNDhEb2cDgg5QbVuzEyH1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import {useState} from 'react'
|
import {useState} from 'react'
|
||||||
import {findNodeHandle, Keyboard, View} from 'react-native'
|
import {findNodeHandle, View} from 'react-native'
|
||||||
import {msg} from '@lingui/core/macro'
|
import {msg} from '@lingui/core/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {Trans} from '@lingui/react/macro'
|
import {Trans} from '@lingui/react/macro'
|
||||||
@@ -64,10 +64,7 @@ export function LabelsBtn({
|
|||||||
color="secondary"
|
color="secondary"
|
||||||
size="small"
|
size="small"
|
||||||
testID="labelsBtn"
|
testID="labelsBtn"
|
||||||
onPress={() => {
|
onPress={() => control.open()}
|
||||||
Keyboard.dismiss()
|
|
||||||
control.open()
|
|
||||||
}}
|
|
||||||
label={_(msg`Content warnings`)}
|
label={_(msg`Content warnings`)}
|
||||||
accessibilityHint={_(
|
accessibilityHint={_(
|
||||||
msg`Opens a dialog to add a content warning to your post`,
|
msg`Opens a dialog to add a content warning to your post`,
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import {useEffect, useMemo, useState} from 'react'
|
import {useEffect, useMemo, useState} from 'react'
|
||||||
import {
|
import {
|
||||||
findNodeHandle,
|
findNodeHandle,
|
||||||
Keyboard,
|
|
||||||
type StyleProp,
|
type StyleProp,
|
||||||
type View,
|
type View,
|
||||||
type ViewStyle,
|
type ViewStyle,
|
||||||
@@ -32,7 +31,6 @@ import {Group3_Stroke2_Corner0_Rounded as GroupIcon} from '#/components/icons/Gr
|
|||||||
import * as Tooltip from '#/components/Tooltip'
|
import * as Tooltip from '#/components/Tooltip'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {useAnalytics} from '#/analytics'
|
import {useAnalytics} from '#/analytics'
|
||||||
import {IS_NATIVE} from '#/env'
|
|
||||||
import {useThreadgateNudged} from '#/storage/hooks/threadgate-nudged'
|
import {useThreadgateNudged} from '#/storage/hooks/threadgate-nudged'
|
||||||
|
|
||||||
export function ThreadgateBtn({
|
export function ThreadgateBtn({
|
||||||
@@ -86,10 +84,6 @@ export function ThreadgateBtn({
|
|||||||
nudged: tooltipWasShown,
|
nudged: tooltipWasShown,
|
||||||
})
|
})
|
||||||
|
|
||||||
if (IS_NATIVE && Keyboard.isVisible()) {
|
|
||||||
Keyboard.dismiss()
|
|
||||||
}
|
|
||||||
|
|
||||||
setShowTooltip(false)
|
setShowTooltip(false)
|
||||||
setThreadgateNudged(true)
|
setThreadgateNudged(true)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user