dismiss keyboard when threadgate settings are opened (#2161)

zio/stable
Ansh 2023-12-12 03:25:40 +05:30 committed by GitHub
parent f7ec7f700e
commit 0f7dbbba4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,5 @@
import React from 'react'
import {TouchableOpacity, StyleSheet} from 'react-native'
import {TouchableOpacity, StyleSheet, Keyboard} from 'react-native'
import {
FontAwesomeIcon,
FontAwesomeIconStyle,
@ -11,6 +11,7 @@ import {useLingui} from '@lingui/react'
import {msg} from '@lingui/macro'
import {useModalControls} from '#/state/modals'
import {ThreadgateSetting} from '#/state/queries/threadgate'
import {isNative} from '#/platform/detection'
export function ThreadgateBtn({
threadgate,
@ -26,6 +27,9 @@ export function ThreadgateBtn({
const onPress = () => {
track('Composer:ThreadgateOpened')
if (isNative && Keyboard.isVisible()) {
Keyboard.dismiss()
}
openModal({
name: 'threadgate',
settings: threadgate,