Skip to content

Commit

Permalink
extra code revomed
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed Jul 28, 2021
1 parent 498b558 commit 2bb1e3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
6 changes: 1 addition & 5 deletions src/components/PopoverWithMeasuredContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ class PopoverWithMeasuredContent extends Component {
) || !_.isEqual(this.state, nextState);
}

setContentMeasured(isContentMeasured) {
this.setState({isContentMeasured});
}

/**
* Measure the size of the popover's content.
*
Expand All @@ -103,7 +99,7 @@ class PopoverWithMeasuredContent extends Component {
measurePopover({nativeEvent}) {
this.popoverWidth = nativeEvent.layout.width;
this.popoverHeight = nativeEvent.layout.height;
this.setContentMeasured(true);
this.setState({isContentMeasured: true});
}

/**
Expand Down
9 changes: 3 additions & 6 deletions src/pages/home/report/ReportActionsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class ReportActionsView extends React.Component {
this.state = {
isLoadingMoreChats: false,
};

this.updateSortedReportActions(props.reportActions);
this.updateMostRecentIOUReportActionNumber(props.reportActions);
this.keyExtractor = this.keyExtractor.bind(this);
Expand Down Expand Up @@ -162,8 +163,7 @@ class ReportActionsView extends React.Component {
return true;
}

// ContextMenu props check
return this.state.contextMenuContext !== nextState.contextMenuContext;
return false;
}

componentDidUpdate(prevProps) {
Expand Down Expand Up @@ -206,6 +206,7 @@ class ReportActionsView extends React.Component {
}

AppState.removeEventListener('change', this.onVisibilityChange);

unsubscribeFromReportChannel(this.props.reportID);
}

Expand All @@ -218,10 +219,6 @@ class ReportActionsView extends React.Component {
}
}

updateContextMenuContext(value) {
this.setState({contextMenuContext: value});
}

/**
* Create a unique key for Each Action in the FlatList.
*
Expand Down

0 comments on commit 2bb1e3f

Please sign in to comment.