[FIX] Room Actions buttons not showing after taking a channel from Omnichannel Queue (#3399)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Reinaldo Neto 2021-09-28 16:33:25 -03:00 committed by GitHub
parent 80d14037be
commit c5df938768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -75,6 +75,7 @@ class RoomActionsView extends React.Component {
const member = props.route.params?.member; const member = props.route.params?.member;
this.rid = props.route.params?.rid; this.rid = props.route.params?.rid;
this.t = props.route.params?.t; this.t = props.route.params?.t;
this.joined = props.route.params?.joined;
this.state = { this.state = {
room: room || { rid: this.rid, t: this.t }, room: room || { rid: this.rid, t: this.t },
membersCount: 0, membersCount: 0,
@ -173,7 +174,7 @@ class RoomActionsView extends React.Component {
get isOmnichannelPreview() { get isOmnichannelPreview() {
const { room } = this.state; const { room } = this.state;
return room.t === 'l' && room.status === 'queued'; return room.t === 'l' && room.status === 'queued' && !this.joined;
} }
onPressTouchable = item => { onPressTouchable = item => {

View File

@ -433,7 +433,7 @@ class RoomView extends React.Component {
goRoomActionsView = screen => { goRoomActionsView = screen => {
logEvent(events.ROOM_GO_RA); logEvent(events.ROOM_GO_RA);
const { room, member } = this.state; const { room, member, joined } = this.state;
const { navigation, isMasterDetail } = this.props; const { navigation, isMasterDetail } = this.props;
if (isMasterDetail) { if (isMasterDetail) {
navigation.navigate('ModalStackNavigator', { navigation.navigate('ModalStackNavigator', {
@ -443,7 +443,8 @@ class RoomView extends React.Component {
t: this.t, t: this.t,
room, room,
member, member,
showCloseModal: !!screen showCloseModal: !!screen,
joined
} }
}); });
} else { } else {
@ -451,7 +452,8 @@ class RoomView extends React.Component {
rid: this.rid, rid: this.rid,
t: this.t, t: this.t,
room, room,
member member,
joined
}); });
} }
}; };