remove: setOmnichannelPermissions function

This commit is contained in:
Gerzon Z 2022-04-19 10:17:11 -04:00
parent 8a77a5fbcb
commit e49ba5e1c5
1 changed files with 5 additions and 10 deletions

View File

@ -290,7 +290,10 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
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<IRoomViewProps, IRoomViewState> {
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<IRoomViewProps, IRoomViewState> {
}
};
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';