diff options
author | Ansh <anshnanda10@gmail.com> | 2023-12-12 03:25:40 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 13:55:40 -0800 |
commit | 0f7dbbba4a7aea3f4b4e677d532acd46917f02de (patch) | |
tree | 5a35dffc034d3ad713eba1b20112f6347e0665d0 /src/view/com/composer/threadgate/ThreadgateBtn.tsx | |
parent | f7ec7f700e65e2636d7ada0b7a2029a6ad038eb7 (diff) | |
download | voidsky-0f7dbbba4a7aea3f4b4e677d532acd46917f02de.tar.zst |
dismiss keyboard when threadgate settings are opened (#2161)
Diffstat (limited to 'src/view/com/composer/threadgate/ThreadgateBtn.tsx')
-rw-r--r-- | src/view/com/composer/threadgate/ThreadgateBtn.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/view/com/composer/threadgate/ThreadgateBtn.tsx b/src/view/com/composer/threadgate/ThreadgateBtn.tsx index efc4525ae..ebbc613ff 100644 --- a/src/view/com/composer/threadgate/ThreadgateBtn.tsx +++ b/src/view/com/composer/threadgate/ThreadgateBtn.tsx @@ -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, |