Skip to content

Commit

Permalink
Merge pull request #18884 from bernhardoj/fix/18238-composer-flicker-…
Browse files Browse the repository at this point in the history
…when-sending-lines-of-msg

Fix composer flickers when sending multiple lines of message on Android
  • Loading branch information
yuwenmemon authored May 15, 2023
2 parents ef1935b + 18ec7be commit 9eccde1
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 @@ -867,6 +867,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 @@ -908,7 +909,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 @@ -928,7 +929,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 @@ -1039,7 +1040,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 9eccde1

Please sign in to comment.