chore: make icon available on first re-render after joining the room
This commit is contained in:
parent
97d4dc9f3b
commit
2dcadf8633
|
@ -175,7 +175,7 @@ export interface IServerRoom extends IRocketChatRecord {
|
|||
unread?: number;
|
||||
alert?: boolean;
|
||||
hideUnreadStatus?: boolean;
|
||||
|
||||
status?: string;
|
||||
sysMes?: string[];
|
||||
muted?: string[];
|
||||
unmuted?: string[];
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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' />
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue