Skip to content

Commit

Permalink
Fix SendButton being clickable only once
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki committed Aug 26, 2024
1 parent aecefaa commit 14bab6a
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions src/pages/home/report/ReportActionCompose/SendButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,26 @@ function SendButton({isDisabled: isDisabledProp, handleSendMessage}: SendButtonP
key={`send-button-${isSmallScreenWidth ? 'small-screen' : 'normal-screen'}`}
gesture={Tap}
>
<Tooltip text={translate('common.send')}>
<PressableWithFeedback
style={({pressed, isDisabled}) => [
styles.chatItemSubmitButton,
isDisabledProp || pressed || isDisabled ? undefined : styles.buttonSuccess,
isDisabledProp ? styles.cursorDisabled : undefined,
]}
role={CONST.ROLE.BUTTON}
accessibilityLabel={translate('common.send')}
>
{({pressed}) => (
<Icon
src={Expensicons.Send}
fill={isDisabledProp || pressed ? theme.icon : theme.textLight}
/>
)}
</PressableWithFeedback>
</Tooltip>
<View collapsable={false}>
<Tooltip text={translate('common.send')}>
<PressableWithFeedback
style={({pressed, isDisabled}) => [
styles.chatItemSubmitButton,
isDisabledProp || pressed || isDisabled ? undefined : styles.buttonSuccess,
isDisabledProp ? styles.cursorDisabled : undefined,
]}
role={CONST.ROLE.BUTTON}
accessibilityLabel={translate('common.send')}
>
{({pressed}) => (
<Icon
src={Expensicons.Send}
fill={isDisabledProp || pressed ? theme.icon : theme.textLight}
/>
)}
</PressableWithFeedback>
</Tooltip>
</View>
</GestureDetector>
</View>
);
Expand Down

0 comments on commit 14bab6a

Please sign in to comment.