diff --git a/app/views/DiscussionMessagesView.js b/app/views/DiscussionMessagesView.js index 4e6750192..3f908177d 100644 --- a/app/views/DiscussionMessagesView.js +++ b/app/views/DiscussionMessagesView.js @@ -30,6 +30,7 @@ const DiscussionMessagesView = ({ navigation, route }) => { const canAutoTranslate = route.params?.canAutoTranslate; const autoTranslate = route.params?.autoTranslate; const autoTranslateLanguage = route.params?.autoTranslateLanguage; + const navToRoomInfo = route.params?.navToRoomInfo; const user = useSelector(state => state.login?.user); const baseUrl = useSelector(state => state.server.server); const useRealName = useSelector(state => state.settings.UI_Use_Real_Name); @@ -164,7 +165,7 @@ const DiscussionMessagesView = ({ navigation, route }) => { item={item} user={user} rid={rid} - navToRoomInfo={() => {}} + navToRoomInfo={navToRoomInfo} onDiscussionPress={onDiscussionPress} baseUrl={baseUrl} timeFormat={Message_TimeFormat} @@ -173,7 +174,6 @@ const DiscussionMessagesView = ({ navigation, route }) => { autoTranslateLanguage={autoTranslateLanguage} /> ); - if (!discussions?.length) { return ( <> diff --git a/app/views/RoomActionsView/index.js b/app/views/RoomActionsView/index.js index 585f6237b..6614d75ae 100644 --- a/app/views/RoomActionsView/index.js +++ b/app/views/RoomActionsView/index.js @@ -78,6 +78,7 @@ class RoomActionsView extends React.Component { const member = props.route.params?.member; this.rid = props.route.params?.rid; this.t = props.route.params?.t; + this.navToRoomInfo = props.route.params?.navToRoomInfo; this.state = { room: room || { rid: this.rid, t: this.t }, membersCount: 0, @@ -987,7 +988,8 @@ class RoomActionsView extends React.Component { prid, canAutoTranslate, autoTranslate: room.autoTranslate, - autoTranslateLanguage: room.autoTranslateLanguage + autoTranslateLanguage: room.autoTranslateLanguage, + navToRoomInfo: navParam => this.navToRoomInfo(navParam) } })} testID='room-actions-discussions' diff --git a/app/views/RoomView/index.js b/app/views/RoomView/index.js index 484e17209..9ff9438c8 100644 --- a/app/views/RoomView/index.js +++ b/app/views/RoomView/index.js @@ -420,12 +420,12 @@ class RoomView extends React.Component { navigation.navigate('ModalStackNavigator', { screen: screen ?? 'RoomActionsView', params: { - rid: this.rid, t: this.t, room, member, showCloseModal: !!screen + rid: this.rid, t: this.t, room, member, showCloseModal: !!screen, navToRoomInfo: navParam => this.navToRoomInfo(navParam) } }); } else { navigation.push('RoomActionsView', { - rid: this.rid, t: this.t, room, member + rid: this.rid, t: this.t, room, member, navToRoomInfo: navParam => this.navToRoomInfo(navParam) }); } }