dismiss keyboard on touch mute dialog (#3074)

zio/stable
Hailey 2024-03-01 17:15:20 -08:00 committed by GitHub
parent 2962862de2
commit 4fc0b566ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 172 additions and 165 deletions

View File

@ -1,5 +1,5 @@
import React from 'react'
import {View} from 'react-native'
import {Keyboard, View} from 'react-native'
import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {AppBskyActorDefs, sanitizeMutedWordValue} from '@atproto/api'
@ -81,6 +81,7 @@ function MutedWordsInner({}: {control: Dialog.DialogOuterProps['control']}) {
return (
<Dialog.ScrollableInner label={_(msg`Manage your muted words and tags`)}>
<View onTouchStart={Keyboard.dismiss}>
<Text
style={[a.text_md, a.font_bold, a.pb_sm, t.atoms.text_contrast_high]}>
<Trans>Add muted words and tags</Trans>
@ -201,8 +202,8 @@ function MutedWordsInner({}: {control: Dialog.DialogOuterProps['control']}) {
t.atoms.text_contrast_medium,
]}>
<Trans>
We recommend avoiding common words that appear in many posts, since
it can result in no posts being shown.
We recommend avoiding common words that appear in many posts,
since it can result in no posts being shown.
</Trans>
</Text>
</View>
@ -211,7 +212,12 @@ function MutedWordsInner({}: {control: Dialog.DialogOuterProps['control']}) {
<View style={[a.pt_2xl]}>
<Text
style={[a.text_md, a.font_bold, a.pb_md, t.atoms.text_contrast_high]}>
style={[
a.text_md,
a.font_bold,
a.pb_md,
t.atoms.text_contrast_high,
]}>
<Trans>Your muted words</Trans>
</Text>
@ -250,6 +256,7 @@ function MutedWordsInner({}: {control: Dialog.DialogOuterProps['control']}) {
{isNative && <View style={{height: 20}} />}
<Dialog.Close />
</View>
</Dialog.ScrollableInner>
)
}