Skip to content

Commit

Permalink
cleanup unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
akinwale committed May 9, 2023
1 parent de4bef4 commit 70e0eec
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ class ReportActionCompose extends React.Component {
this.showPopoverMenu = this.showPopoverMenu.bind(this);
this.comment = props.comment;
this.setShouldBlockEmojiCalcToFalse = this.setShouldBlockEmojiCalcToFalse.bind(this);
this.setIsAttachmentPreviewActiveToFalse = this.setIsAttachmentPreviewActiveToFalse.bind(this);
this.attachmentPreviewClosed = this.attachmentPreviewClosed.bind(this);

// React Native will retain focus on an input for native devices but web/mWeb behave differently so we have some focus management
Expand Down Expand Up @@ -417,13 +416,6 @@ class ReportActionCompose extends React.Component {
}
}

// eslint-disable-next-line rulesdir/prefer-early-return
setIsAttachmentPreviewActiveToFalse() {
if (this.state && this.state.isAttachmentPreviewActive) {
this.setState({isAttachmentPreviewActive: false});
}
}

/**
* Determines if we can show the task option
* @param {Array} reportParticipants
Expand Down Expand Up @@ -762,7 +754,7 @@ class ReportActionCompose extends React.Component {
*/
attachmentPreviewClosed() {
this.setShouldBlockEmojiCalcToFalse();
this.setIsAttachmentPreviewActiveToFalse();
this.setState({isAttachmentPreviewActive: false});
}

render() {
Expand Down

0 comments on commit 70e0eec

Please sign in to comment.