Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Verify useRealName setting on files screen #2427

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions app/views/MessagesView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand All @@ -91,6 +94,7 @@ class MessagesView extends React.Component {
isEdited: !!item.editedAt,
isHeader: true,
attachments: item.attachments || [],
useRealName,
showAttachment: this.showAttachment,
getCustomEmoji: this.getCustomEmoji,
navToRoomInfo: this.navToRoomInfo
Expand Down Expand Up @@ -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)));