From edf73124bb574dcdeff030722fbb0afd22685764 Mon Sep 17 00:00:00 2001 From: Prateek Jain <44807945+Prateek93a@users.noreply.github.com> Date: Thu, 14 Nov 2019 00:34:49 +0530 Subject: [PATCH] [FIX] Clicking user avatar in thread previews crashes app (#1363) --- app/views/ThreadMessagesView/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/views/ThreadMessagesView/index.js b/app/views/ThreadMessagesView/index.js index 05e6c782..962d847a 100644 --- a/app/views/ThreadMessagesView/index.js +++ b/app/views/ThreadMessagesView/index.js @@ -257,6 +257,14 @@ class ThreadMessagesView extends React.Component { ) + 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} /> ); }