dismiss keyboard when threadgate settings are opened (#2161)
parent
f7ec7f700e
commit
0f7dbbba4a
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue