Regression: Room header not showing room type when not joined (#4427)

This commit is contained in:
Reinaldo Neto 2022-08-11 15:29:24 -03:00 committed by GitHub
parent 2a522158ad
commit 999e8ab660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -550,8 +550,6 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
parentTitle = getRoomTitle(room);
}
let subtitle: string | undefined;
let t: string;
let teamMain: boolean | undefined;
let teamId: string | undefined;
let encrypted: boolean | undefined;
let userId: string | undefined;
@ -562,8 +560,6 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
let departmentId: string | undefined;
if ('id' in room) {
subtitle = room.topic;
t = room.t;
teamMain = room.teamMain;
teamId = room.teamId;
encrypted = room.encrypted;
({ id: userId, token } = user);
@ -573,11 +569,12 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
}
if ('source' in room) {
t = room.t;
sourceType = room.source;
visitor = room.visitor;
}
const t = room?.t;
const teamMain = 'teamMain' in room ? room?.teamMain : false;
const omnichannelPermissions = { canForwardGuest, canReturnQueue, canPlaceLivechatOnHold };
navigation.setOptions({