Skip to content

Commit

Permalink
Merge pull request #7228 from Expensify/cmartins-fixMessageButton
Browse files Browse the repository at this point in the history
Do not show "Message <user>" button when seeing your own profile
  • Loading branch information
marcochavezf authored Jan 18, 2022
2 parents feeb2b7 + 4f2975b commit 54580da
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/pages/DetailsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,15 @@ const DetailsPage = (props) => {
</View>
) : null}
</View>
<MenuItem
title={`${props.translate('common.message')}${details.displayName}`}
icon={Expensicons.ChatBubble}
onPress={() => Report.fetchOrCreateChatReport([props.session.email, details.login])}
wrapperStyle={styles.breakAll}
shouldShowRightIcon
/>
{details.login !== props.session.email && (
<MenuItem
title={`${props.translate('common.message')}${details.displayName}`}
icon={Expensicons.ChatBubble}
onPress={() => Report.fetchOrCreateChatReport([props.session.email, details.login])}
wrapperStyle={styles.breakAll}
shouldShowRightIcon
/>
)}
</ScrollView>
) : null}
</View>
Expand Down

0 comments on commit 54580da

Please sign in to comment.