[FIX] Clicking user avatar in thread previews crashes app (#1363)

This commit is contained in:
Prateek Jain 2019-11-14 00:34:49 +05:30 committed by Diego Mello
parent 11e1778f77
commit edf73124bb
1 changed files with 9 additions and 0 deletions

View File

@ -257,6 +257,14 @@ class ThreadMessagesView extends React.Component {
</View>
)
navToRoomInfo = (navParam) => {
const { navigation, user } = this.props;
if (navParam.rid === user.id) {
return;
}
navigation.navigate('RoomInfoView', navParam);
}
renderItem = ({ item }) => {
const {
user, navigation, baseUrl, useRealName
@ -276,6 +284,7 @@ class ThreadMessagesView extends React.Component {
baseUrl={baseUrl}
useRealName={useRealName}
getCustomEmoji={this.getCustomEmoji}
navToRoomInfo={this.navToRoomInfo}
/>
);
}