Skip to content

Commit

Permalink
Merge pull request #7252 from Expensify/amal-ucpr-fix-new-room
Browse files Browse the repository at this point in the history
Fix report icon logic for newly created policy rooms
  • Loading branch information
deetergp authored Jan 25, 2022
2 parents 3b2403a + 2503fb4 commit 4936dfb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import * as API from '../API';
import CONST from '../../CONST';
import Log from '../Log';
import * as ReportUtils from '../reportUtils';
import * as OptionsListUtils from '../OptionsListUtils';
import Timers from '../Timers';
import * as ReportActions from './ReportActions';
import Growl from '../Growl';
Expand Down Expand Up @@ -1576,6 +1577,11 @@ function createPolicyRoom(policyID, reportName, visibility) {
Log.error('Unable to grab policy room after creation', reportID);
return;
}

// Make sure the report has its icons set
const report = allReports[reportID];
const icons = OptionsListUtils.getReportIcons(report, {});
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {icons});
Navigation.navigate(ROUTES.getReportRoute(reportID));
})
.catch(() => {
Expand Down

0 comments on commit 4936dfb

Please sign in to comment.