diff --git a/app/views/RoomView/index.tsx b/app/views/RoomView/index.tsx index 0f3419ac6..546596730 100644 --- a/app/views/RoomView/index.tsx +++ b/app/views/RoomView/index.tsx @@ -290,7 +290,10 @@ class RoomView extends React.Component { this.updateUnreadCount(); } if (this.t === 'l') { - this.setOmnichannelPermissions(); + const canForwardGuest = this.canForwardGuest(); + const canReturnQueue = this.canReturnQueue(); + const canViewCannedResponse = this.canViewCannedResponse(); + this.setState({ canForwardGuest, canReturnQueue, canViewCannedResponse }); } }); if (isTablet) { @@ -371,7 +374,7 @@ class RoomView extends React.Component { roomUpdate.teamId !== prevState.roomUpdate.teamId) && !this.tmid ) { - this.setOmnichannelPermissions(); + this.setHeader(); } if (insets.left !== prevProps.insets.left || insets.right !== prevProps.insets.right) { this.setHeader(); @@ -455,14 +458,6 @@ class RoomView extends React.Component { } }; - setOmnichannelPermissions = async () => { - const canForwardGuest = await this.canForwardGuest(); - const canReturnQueue = await this.canReturnQueue(); - const canViewCannedResponse = await this.canViewCannedResponse(); - this.setState({ canForwardGuest, canReturnQueue, canViewCannedResponse }); - this.setHeader(); - }; - get isOmnichannel() { const { room } = this.state; return room.t === 'l';