Skip to content

Commit 8aa5028

Browse files
danieldoglasOSBotify
authored andcommitted
Merge pull request #8011 from Expensify/amal-fix-reportdetails-icons
Fix reportDetails icons for chatrooms (cherry picked from commit d64f8c5)
1 parent ecdbb43 commit 8aa5028

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/pages/ReportDetailsPage.js

Lines changed: 11 additions & 1 deletion
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';
@@ -103,6 +103,7 @@ class ReportDetailsPage extends Component {
103103
}
104104

105105
render() {
106+
const isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(this.props.report);
106107
const isChatRoom = ReportUtils.isChatRoom(this.props.report);
107108
const chatRoomSubtitle = ReportUtils.getChatRoomSubtitle(this.props.report, this.props.policies);
108109
const participants = lodashGet(this.props.report, 'participants', []);
@@ -131,13 +132,22 @@ class ReportDetailsPage extends Component {
131132
<View
132133
style={styles.reportDetailsTitleContainer}
133134
>
135+
<<<<<<< HEAD
134136
<Avatar
135137
isChatRoom={isChatRoom}
136138
isArchivedRoom={ReportUtils.isArchivedRoom(this.props.report)}
137139
containerStyles={[styles.singleAvatarLarge, styles.mb4]}
138140
imageStyles={[styles.singleAvatarLarge]}
139141
source={this.props.report.icons[0]}
140142
/>
143+
=======
144+
<View style={styles.mb4}>
145+
<RoomHeaderAvatars
146+
avatarIcons={OptionsListUtils.getAvatarSources(this.props.report)}
147+
shouldShowLargeAvatars={isPolicyExpenseChat}
148+
/>
149+
</View>
150+
>>>>>>> d64f8c52c (Merge pull request #8011 from Expensify/amal-fix-reportdetails-icons)
141151
<View style={[styles.reportDetailsRoomInfo, styles.mw100]}>
142152
<View style={[styles.alignSelfCenter, styles.w100]}>
143153
<DisplayNames

src/styles/styles.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,14 +1495,6 @@ const styles = {
14951495
borderRadius: 18,
14961496
},
14971497

1498-
singleAvatarLarge: {
1499-
height: 64,
1500-
width: 64,
1501-
backgroundColor: themeColors.icon,
1502-
borderRadius: 64,
1503-
overflow: 'hidden',
1504-
},
1505-
15061498
secondAvatar: {
15071499
position: 'absolute',
15081500
right: -18,
@@ -1752,7 +1744,7 @@ const styles = {
17521744
...flex.flexColumn,
17531745
...flex.alignItemsCenter,
17541746
...spacing.mt4,
1755-
height: 150,
1747+
height: 170,
17561748
},
17571749

17581750
reportDetailsRoomInfo: {

0 commit comments

Comments
 (0)