diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index 223606dc30c3..f088e31bcaff 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -246,6 +246,8 @@ class ReportScreen extends React.Component { const shouldAnimate = !shouldFreeze; const parentReportAction = ReportActionsUtils.getParentReportAction(this.props.report); const isSingleTransactionView = ReportActionsUtils.isTransactionThread(parentReportAction); + const policy = this.props.policies[`${ONYXKEYS.COLLECTION.POLICY}${this.props.report.policyID}`]; + return ( )} diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index a2b5d32b8d27..d439242004dd 100755 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -38,6 +38,11 @@ const propTypes = { /** Information about the network */ network: networkPropTypes.isRequired, + /** Policy values needed in the component */ + policy: PropTypes.shape({ + avatar: PropTypes.string, + }), + ...windowDimensionsPropTypes, ...withDrawerPropTypes, ...withLocalizePropTypes, @@ -45,6 +50,7 @@ const propTypes = { const defaultProps = { reportActions: [], + policy: {}, }; class ReportActionsView extends React.Component { @@ -120,6 +126,10 @@ class ReportActionsView extends React.Component { } shouldComponentUpdate(nextProps, nextState) { + if (lodashGet(this.props, 'policy.avatar') !== lodashGet(nextProps, 'policy.avatar')) { + return true; + } + if (!_.isEqual(nextProps.reportActions, this.props.reportActions)) { this.mostRecentIOUReportActionID = ReportActionsUtils.getMostRecentIOURequestActionID(nextProps.reportActions); return true;