Skip to content

Commit

Permalink
Removed BB/CC fields from notes in ChatInput component (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsojan authored Mar 21, 2024
1 parent 31cf4e2 commit b4b9407
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/components/ChatInput/ChatInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ export const ChatInput = forwardRef(

const showEmailFieldsAndAttachments = () => {
setIsAttachmentsVisible(true);
setIsEmailFieldsVisible(true);
isNoteOptionSelected
? setIsEmailFieldsVisible(false)
: setIsEmailFieldsVisible(true);
};

const hideEmailFieldsAndAttachments = () => {
Expand Down Expand Up @@ -305,7 +307,7 @@ export const ChatInput = forwardRef(
]);

const shouldShowExpandAndMinimizeButton =
attachmentsCount > 0 || toEmails.length > 0;
attachmentsCount > 0 || (toEmails.length > 0 && !isNoteOptionSelected);

const shouldDisableWhenForwardAndToFieldMissing =
isForwardOptionSelected && toEmailsForForward.length === 0;
Expand Down Expand Up @@ -353,9 +355,9 @@ export const ChatInput = forwardRef(
onTouchStart={hideEmailFieldsAndAttachments}
{...rest}
/>
<Container alignSelf="center">
{shouldShowExpandAndMinimizeButton &&
(isEmailFieldsVisible || isAttachmentsVisible ? (
{shouldShowExpandAndMinimizeButton && (
<Container alignSelf="center">
{isEmailFieldsVisible || isAttachmentsVisible ? (
<IconButton
Icon={MinimizeSVG}
height={moderateScale(30)}
Expand All @@ -371,8 +373,9 @@ export const ChatInput = forwardRef(
width={moderateScale(30)}
onPress={showEmailFieldsAndAttachments}
/>
))}
</Container>
)}
</Container>
)}
</Container>
<AttachmentsView
Attachments={Attachments}
Expand Down

0 comments on commit b4b9407

Please sign in to comment.