[FIX] Real name being ignored in SearchMessagesView (#2838)

Co-authored-by: Gerzon Z <gerzonc@icloud.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Anant Bhasin 2021-02-12 03:13:57 +05:30 committed by GitHub
parent 4d9410ad60
commit 036dee16cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -42,7 +42,8 @@ class SearchMessagesView extends React.Component {
user: PropTypes.object, user: PropTypes.object,
baseUrl: PropTypes.string, baseUrl: PropTypes.string,
customEmojis: PropTypes.object, customEmojis: PropTypes.object,
theme: PropTypes.string theme: PropTypes.string,
useRealName: PropTypes.bool
} }
constructor(props) { constructor(props) {
@ -143,7 +144,9 @@ class SearchMessagesView extends React.Component {
} }
renderItem = ({ item }) => { renderItem = ({ item }) => {
const { user, baseUrl, theme } = this.props; const {
user, baseUrl, theme, useRealName
} = this.props;
return ( return (
<Message <Message
item={item} item={item}
@ -154,6 +157,7 @@ class SearchMessagesView extends React.Component {
showAttachment={() => {}} showAttachment={() => {}}
getCustomEmoji={this.getCustomEmoji} getCustomEmoji={this.getCustomEmoji}
navToRoomInfo={this.navToRoomInfo} navToRoomInfo={this.navToRoomInfo}
useRealName={useRealName}
theme={theme} theme={theme}
/> />
); );
@ -206,6 +210,7 @@ class SearchMessagesView extends React.Component {
const mapStateToProps = state => ({ const mapStateToProps = state => ({
baseUrl: state.server.server, baseUrl: state.server.server,
user: getUserSelector(state), user: getUserSelector(state),
useRealName: state.settings.UI_Use_Real_Name,
customEmojis: state.customEmojis customEmojis: state.customEmojis
}); });