From 0f7dbbba4a7aea3f4b4e677d532acd46917f02de Mon Sep 17 00:00:00 2001 From: Ansh Date: Tue, 12 Dec 2023 03:25:40 +0530 Subject: [PATCH] dismiss keyboard when threadgate settings are opened (#2161) --- src/view/com/composer/threadgate/ThreadgateBtn.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/view/com/composer/threadgate/ThreadgateBtn.tsx b/src/view/com/composer/threadgate/ThreadgateBtn.tsx index efc4525ae8..ebbc613fff 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,