Skip to content

Commit 8b59a8f

Browse files
Amal NazeemOSBotify
Amal Nazeem
authored andcommitted
Merge pull request #8058 from Expensify/amal-reapply-pr-correctly
Reapply RoomHeaderAvatars Logic to fix regression correctly this time (cherry picked from commit 1d44ed3)
1 parent b6a36a1 commit 8b59a8f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/pages/ReportDetailsPage.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Str from 'expensify-common/lib/str';
55
import _ from 'underscore';
66
import {View, ScrollView} from 'react-native';
77
import lodashGet from 'lodash/get';
8-
import Avatar from '../components/Avatar';
8+
import RoomHeaderAvatars from '../components/RoomHeaderAvatars';
99
import compose from '../libs/compose';
1010
import withLocalize, {withLocalizePropTypes} from '../components/withLocalize';
1111
import ONYXKEYS from '../ONYXKEYS';
@@ -108,6 +108,7 @@ class ReportDetailsPage extends Component {
108108
}
109109

110110
render() {
111+
const isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(this.props.report);
111112
const isChatRoom = ReportUtils.isChatRoom(this.props.report);
112113
const chatRoomSubtitle = ReportUtils.getChatRoomSubtitle(this.props.report, this.props.policies);
113114
const participants = lodashGet(this.props.report, 'participants', []);
@@ -136,13 +137,12 @@ class ReportDetailsPage extends Component {
136137
<View
137138
style={styles.reportDetailsTitleContainer}
138139
>
139-
<Avatar
140-
isChatRoom={isChatRoom}
141-
isArchivedRoom={ReportUtils.isArchivedRoom(this.props.report)}
142-
containerStyles={[styles.singleAvatarLarge, styles.mb4]}
143-
imageStyles={[styles.singleAvatarLarge]}
144-
source={this.props.report.icons[0]}
145-
/>
140+
<View style={styles.mb4}>
141+
<RoomHeaderAvatars
142+
avatarIcons={OptionsListUtils.getAvatarSources(this.props.report)}
143+
shouldShowLargeAvatars={isPolicyExpenseChat}
144+
/>
145+
</View>
146146
<View style={[styles.reportDetailsRoomInfo, styles.mw100]}>
147147
<View style={[styles.alignSelfCenter, styles.w100]}>
148148
<DisplayNames

0 commit comments

Comments
 (0)