[FIX] Clicking user avatar in thread previews crashes app (#1363)
This commit is contained in:
parent
11e1778f77
commit
edf73124bb
|
@ -257,6 +257,14 @@ class ThreadMessagesView extends React.Component {
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
navToRoomInfo = (navParam) => {
|
||||||
|
const { navigation, user } = this.props;
|
||||||
|
if (navParam.rid === user.id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
navigation.navigate('RoomInfoView', navParam);
|
||||||
|
}
|
||||||
|
|
||||||
renderItem = ({ item }) => {
|
renderItem = ({ item }) => {
|
||||||
const {
|
const {
|
||||||
user, navigation, baseUrl, useRealName
|
user, navigation, baseUrl, useRealName
|
||||||
|
@ -276,6 +284,7 @@ class ThreadMessagesView extends React.Component {
|
||||||
baseUrl={baseUrl}
|
baseUrl={baseUrl}
|
||||||
useRealName={useRealName}
|
useRealName={useRealName}
|
||||||
getCustomEmoji={this.getCustomEmoji}
|
getCustomEmoji={this.getCustomEmoji}
|
||||||
|
navToRoomInfo={this.navToRoomInfo}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue