chore: make icon available on first re-render after joining the room

This commit is contained in:
Gerzon Z 2022-04-18 09:14:12 -04:00
parent 97d4dc9f3b
commit 2dcadf8633
4 changed files with 5 additions and 4 deletions

View File

@ -175,7 +175,7 @@ export interface IServerRoom extends IRocketChatRecord {
unread?: number;
alert?: boolean;
hideUnreadStatus?: boolean;
status?: string;
sysMes?: string[];
muted?: string[];
unmuted?: string[];

View File

@ -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: {

View File

@ -285,7 +285,7 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
isOmnichannelPreview = () => {
const { joined, status } = this.props;
return joined && status !== 'queued';
return !joined && status === 'queued';
};
render() {
@ -293,7 +293,7 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
const { t, tmid, threadsEnabled, teamId, joined } = this.props;
if (t === 'l') {
if (this.isOmnichannelPreview()) {
if (!this.isOmnichannelPreview()) {
return (
<HeaderButton.Container>
<HeaderButton.Item iconName='kebab' onPress={this.showMoreActions} testID='room-view-header-omnichannel-kebab' />

View File

@ -467,7 +467,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
}
let numIconsRight = 2;
if (tmid) {
if (tmid || room.status) {
numIconsRight = 1;
} else if (teamId && isTeamRoom({ teamId, joined })) {
numIconsRight = 3;