Skip to content

Commit

Permalink
Fix: Revert change
Browse files Browse the repository at this point in the history
  • Loading branch information
truph01 committed Jun 19, 2024
1 parent f6a8aea commit e769861
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/pages/home/report/ReportActionCompose/SendButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Tooltip from '@components/Tooltip';
import useLocalize from '@hooks/useLocalize';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import CONST from '@src/CONST';

type SendButtonProps = {
Expand All @@ -23,7 +22,6 @@ function SendButton({isDisabled: isDisabledProp, handleSendMessage}: SendButtonP
const theme = useTheme();
const styles = useThemeStyles();
const {translate} = useLocalize();
const {isSmallScreenWidth} = useWindowDimensions();

const Tap = Gesture.Tap().onEnd(() => {
handleSendMessage();
Expand All @@ -35,12 +33,7 @@ function SendButton({isDisabled: isDisabledProp, handleSendMessage}: SendButtonP
// Keep focus on the composer when Send message is clicked.
onMouseDown={(e) => e.preventDefault()}
>
<GestureDetector
// A new GestureDetector instance must be created when switching from a large screen to a small screen
// if not, the GestureDetector may not function correctly.
key={`${isSmallScreenWidth ? 0 : 1}`}
gesture={Tap}
>
<GestureDetector gesture={Tap}>
<Tooltip text={translate('common.send')}>
<PressableWithFeedback
style={({pressed, isDisabled}) => [
Expand Down

0 comments on commit e769861

Please sign in to comment.