From b45bde96bb5f6bdbe40ff13967191bda67dae521 Mon Sep 17 00:00:00 2001 From: Ezequiel De Oliveira Date: Mon, 24 Aug 2020 23:29:10 -0300 Subject: [PATCH] Show real name in Room action sections Signed-off-by: Ezequiel De Oliveira --- app/views/MessagesView/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/views/MessagesView/index.js b/app/views/MessagesView/index.js index 4e826d3fcb0..db2361df337 100644 --- a/app/views/MessagesView/index.js +++ b/app/views/MessagesView/index.js @@ -25,7 +25,8 @@ class MessagesView extends React.Component { route: PropTypes.object, customEmojis: PropTypes.object, theme: PropTypes.string, - showActionSheet: PropTypes.func + showActionSheet: PropTypes.func, + useRealName: PropTypes.bool } constructor(props) { @@ -81,7 +82,9 @@ class MessagesView extends React.Component { } defineMessagesViewContent = (name) => { - const { user, baseUrl, theme } = this.props; + const { + user, baseUrl, theme, useRealName + } = this.props; const renderItemCommonProps = item => ({ item, baseUrl, @@ -92,6 +95,7 @@ class MessagesView extends React.Component { isEdited: !!item.editedAt, isHeader: true, attachments: item.attachments || [], + useRealName, showAttachment: this.showAttachment, getCustomEmoji: this.getCustomEmoji, navToRoomInfo: this.navToRoomInfo @@ -311,7 +315,8 @@ class MessagesView extends React.Component { const mapStateToProps = state => ({ baseUrl: state.server.server, user: getUserSelector(state), - customEmojis: state.customEmojis + customEmojis: state.customEmojis, + useRealName: state.settings.UI_Use_Real_Name }); export default connect(mapStateToProps)(withTheme(withActionSheet(MessagesView)));