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;
|
unread?: number;
|
||||||
alert?: boolean;
|
alert?: boolean;
|
||||||
hideUnreadStatus?: boolean;
|
hideUnreadStatus?: boolean;
|
||||||
|
status?: string;
|
||||||
sysMes?: string[];
|
sysMes?: string[];
|
||||||
muted?: string[];
|
muted?: string[];
|
||||||
unmuted?: string[];
|
unmuted?: string[];
|
||||||
|
|
|
@ -33,6 +33,7 @@ export type ChatsStackParamList = {
|
||||||
jumpToThreadId?: string;
|
jumpToThreadId?: string;
|
||||||
roomUserId?: string | null;
|
roomUserId?: string | null;
|
||||||
usedCannedResponse?: string;
|
usedCannedResponse?: string;
|
||||||
|
status?: string;
|
||||||
}
|
}
|
||||||
| undefined; // Navigates back to RoomView already on stack
|
| undefined; // Navigates back to RoomView already on stack
|
||||||
RoomActionsView: {
|
RoomActionsView: {
|
||||||
|
|
|
@ -285,7 +285,7 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
|
||||||
|
|
||||||
isOmnichannelPreview = () => {
|
isOmnichannelPreview = () => {
|
||||||
const { joined, status } = this.props;
|
const { joined, status } = this.props;
|
||||||
return joined && status !== 'queued';
|
return !joined && status === 'queued';
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -293,7 +293,7 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
|
||||||
const { t, tmid, threadsEnabled, teamId, joined } = this.props;
|
const { t, tmid, threadsEnabled, teamId, joined } = this.props;
|
||||||
|
|
||||||
if (t === 'l') {
|
if (t === 'l') {
|
||||||
if (this.isOmnichannelPreview()) {
|
if (!this.isOmnichannelPreview()) {
|
||||||
return (
|
return (
|
||||||
<HeaderButton.Container>
|
<HeaderButton.Container>
|
||||||
<HeaderButton.Item iconName='kebab' onPress={this.showMoreActions} testID='room-view-header-omnichannel-kebab' />
|
<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;
|
let numIconsRight = 2;
|
||||||
if (tmid) {
|
if (tmid || room.status) {
|
||||||
numIconsRight = 1;
|
numIconsRight = 1;
|
||||||
} else if (teamId && isTeamRoom({ teamId, joined })) {
|
} else if (teamId && isTeamRoom({ teamId, joined })) {
|
||||||
numIconsRight = 3;
|
numIconsRight = 3;
|
||||||
|
|
Loading…
Reference in New Issue