From c5df9387689e548dee5d4bfa5abaeb04bf534516 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Tue, 28 Sep 2021 16:33:25 -0300 Subject: [PATCH] [FIX] Room Actions buttons not showing after taking a channel from Omnichannel Queue (#3399) Co-authored-by: Diego Mello --- app/views/RoomActionsView/index.js | 3 ++- app/views/RoomView/index.js | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/RoomActionsView/index.js b/app/views/RoomActionsView/index.js index 56073a0a..c3bd105a 100644 --- a/app/views/RoomActionsView/index.js +++ b/app/views/RoomActionsView/index.js @@ -75,6 +75,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.joined = props.route.params?.joined; this.state = { room: room || { rid: this.rid, t: this.t }, membersCount: 0, @@ -173,7 +174,7 @@ class RoomActionsView extends React.Component { get isOmnichannelPreview() { const { room } = this.state; - return room.t === 'l' && room.status === 'queued'; + return room.t === 'l' && room.status === 'queued' && !this.joined; } onPressTouchable = item => { diff --git a/app/views/RoomView/index.js b/app/views/RoomView/index.js index d7c9d152..3aa38946 100644 --- a/app/views/RoomView/index.js +++ b/app/views/RoomView/index.js @@ -433,7 +433,7 @@ class RoomView extends React.Component { goRoomActionsView = screen => { logEvent(events.ROOM_GO_RA); - const { room, member } = this.state; + const { room, member, joined } = this.state; const { navigation, isMasterDetail } = this.props; if (isMasterDetail) { navigation.navigate('ModalStackNavigator', { @@ -443,7 +443,8 @@ class RoomView extends React.Component { t: this.t, room, member, - showCloseModal: !!screen + showCloseModal: !!screen, + joined } }); } else { @@ -451,7 +452,8 @@ class RoomView extends React.Component { rid: this.rid, t: this.t, room, - member + member, + joined }); } };