From 2dcadf8633229a294ace4915e198dd90341b21d8 Mon Sep 17 00:00:00 2001 From: Gerzon Z Date: Mon, 18 Apr 2022 09:14:12 -0400 Subject: [PATCH] chore: make icon available on first re-render after joining the room --- app/definitions/IRoom.ts | 2 +- app/stacks/types.ts | 1 + app/views/RoomView/RightButtons.tsx | 4 ++-- app/views/RoomView/index.tsx | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/definitions/IRoom.ts b/app/definitions/IRoom.ts index 552d7b5a9..fbaa4656b 100644 --- a/app/definitions/IRoom.ts +++ b/app/definitions/IRoom.ts @@ -175,7 +175,7 @@ export interface IServerRoom extends IRocketChatRecord { unread?: number; alert?: boolean; hideUnreadStatus?: boolean; - + status?: string; sysMes?: string[]; muted?: string[]; unmuted?: string[]; diff --git a/app/stacks/types.ts b/app/stacks/types.ts index ecfd988cc..869275f23 100644 --- a/app/stacks/types.ts +++ b/app/stacks/types.ts @@ -33,6 +33,7 @@ export type ChatsStackParamList = { jumpToThreadId?: string; roomUserId?: string | null; usedCannedResponse?: string; + status?: string; } | undefined; // Navigates back to RoomView already on stack RoomActionsView: { diff --git a/app/views/RoomView/RightButtons.tsx b/app/views/RoomView/RightButtons.tsx index c3b4588a0..6755b986b 100644 --- a/app/views/RoomView/RightButtons.tsx +++ b/app/views/RoomView/RightButtons.tsx @@ -285,7 +285,7 @@ class RightButtonsContainer extends Component { const { joined, status } = this.props; - return joined && status !== 'queued'; + return !joined && status === 'queued'; }; render() { @@ -293,7 +293,7 @@ class RightButtonsContainer extends Component diff --git a/app/views/RoomView/index.tsx b/app/views/RoomView/index.tsx index 46c20297d..149211201 100644 --- a/app/views/RoomView/index.tsx +++ b/app/views/RoomView/index.tsx @@ -467,7 +467,7 @@ class RoomView extends React.Component { } let numIconsRight = 2; - if (tmid) { + if (tmid || room.status) { numIconsRight = 1; } else if (teamId && isTeamRoom({ teamId, joined })) { numIconsRight = 3;