Skip to content

Commit

Permalink
dismiss keyboard when threadgate settings are opened (#2161)
Browse files Browse the repository at this point in the history
  • Loading branch information
ansh authored Dec 11, 2023
1 parent f7ec7f7 commit 0f7dbbb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/view/com/composer/threadgate/ThreadgateBtn.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import {TouchableOpacity, StyleSheet} from 'react-native'
import {TouchableOpacity, StyleSheet, Keyboard} from 'react-native'
import {
FontAwesomeIcon,
FontAwesomeIconStyle,
Expand All @@ -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,
Expand All @@ -26,6 +27,9 @@ export function ThreadgateBtn({

const onPress = () => {
track('Composer:ThreadgateOpened')
if (isNative && Keyboard.isVisible()) {
Keyboard.dismiss()
}
openModal({
name: 'threadgate',
settings: threadgate,
Expand Down

0 comments on commit 0f7dbbb

Please sign in to comment.