Skip to content

Commit

Permalink
fix composer flickers when sending multiple lines of message
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed May 13, 2023
1 parent 293f23b commit 18ec7be
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,7 @@ class ReportActionCompose extends React.Component {
const inputPlaceholder = this.getInputPlaceholder();
const shouldUseFocusedColor = !isBlockedFromConcierge && !this.props.disabled && (this.state.isFocused || this.state.isDraggingOver);
const hasExceededMaxCommentLength = this.state.hasExceededMaxCommentLength;
const isFullComposerAvailable = this.state.isFullComposerAvailable && !_.isEmpty(this.state.value);

return (
<View
Expand Down Expand Up @@ -913,7 +914,7 @@ class ReportActionCompose extends React.Component {
style={[
styles.dFlex,
styles.flexColumn,
this.state.isFullComposerAvailable || this.props.isComposerFullSize ? styles.justifyContentBetween : styles.justifyContentEnd,
isFullComposerAvailable || this.props.isComposerFullSize ? styles.justifyContentBetween : styles.justifyContentEnd,
]}
>
{this.props.isComposerFullSize && (
Expand All @@ -933,7 +934,7 @@ class ReportActionCompose extends React.Component {
</TouchableOpacity>
</Tooltip>
)}
{!this.props.isComposerFullSize && this.state.isFullComposerAvailable && (
{!this.props.isComposerFullSize && isFullComposerAvailable && (
<Tooltip text={this.props.translate('reportActionCompose.expand')}>
<TouchableOpacity
onPress={(e) => {
Expand Down Expand Up @@ -1044,7 +1045,7 @@ class ReportActionCompose extends React.Component {
isDisabled={isComposeDisabled || isBlockedFromConcierge || this.props.disabled}
selection={this.state.selection}
onSelectionChange={this.onSelectionChange}
isFullComposerAvailable={this.state.isFullComposerAvailable}
isFullComposerAvailable={isFullComposerAvailable}
setIsFullComposerAvailable={this.setIsFullComposerAvailable}
isComposerFullSize={this.props.isComposerFullSize}
value={this.state.value}
Expand Down

0 comments on commit 18ec7be

Please sign in to comment.