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:
Claude
2026-02-28 22:26:10 +00:00
committed by Samuel Newman
parent 382710f93e
commit 919a7af7b6
2 changed files with 2 additions and 11 deletions
+2 -5
View File
@@ -1,5 +1,5 @@
import {useState} from 'react'
import {findNodeHandle, Keyboard, View} from 'react-native'
import {findNodeHandle, View} from 'react-native'
import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react'
import {Trans} from '@lingui/react/macro'
@@ -64,10 +64,7 @@ export function LabelsBtn({
color="secondary"
size="small"
testID="labelsBtn"
onPress={() => {
Keyboard.dismiss()
control.open()
}}
onPress={() => control.open()}
label={_(msg`Content warnings`)}
accessibilityHint={_(
msg`Opens a dialog to add a content warning to your post`,
@@ -1,7 +1,6 @@
import {useEffect, useMemo, useState} from 'react'
import {
findNodeHandle,
Keyboard,
type StyleProp,
type View,
type ViewStyle,
@@ -32,7 +31,6 @@ import {Group3_Stroke2_Corner0_Rounded as GroupIcon} from '#/components/icons/Gr
import * as Tooltip from '#/components/Tooltip'
import {Text} from '#/components/Typography'
import {useAnalytics} from '#/analytics'
import {IS_NATIVE} from '#/env'
import {useThreadgateNudged} from '#/storage/hooks/threadgate-nudged'
export function ThreadgateBtn({
@@ -86,10 +84,6 @@ export function ThreadgateBtn({
nudged: tooltipWasShown,
})
if (IS_NATIVE && Keyboard.isVisible()) {
Keyboard.dismiss()
}
setShowTooltip(false)
setThreadgateNudged(true)