update: validation for on-hold

remove: unused variable
This commit is contained in:
Gerzon Z 2022-05-04 12:02:26 -04:00
parent 2575d1dc9e
commit b346ab8372
2 changed files with 4 additions and 3 deletions

View File

@ -314,8 +314,7 @@ class MessageBox extends Component<IMessageBoxProps, IMessageBoxState> {
tshow,
mentionLoading,
trackingType,
permissionToUpload,
canViewCannedResponse
permissionToUpload
} = this.state;
const { roomType, replying, editing, isFocused, message, theme, usedCannedResponse, uploadFilePermission } = this.props;

View File

@ -183,6 +183,7 @@ interface IRoomViewState {
joinCodeRequired?: boolean;
status?: boolean;
lastMessage?: ILastMessage;
sysMes?: boolean;
onHold?: boolean;
};
roomUpdate: {
@ -399,7 +400,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
// If it's a livechat room
if (this.t === 'l') {
if (
!roomUpdate?.lastMessage?.token ||
!dequal(prevState.roomUpdate.lastMessage?.token, roomUpdate.lastMessage?.token) ||
!dequal(prevState.roomUpdate.visitor, roomUpdate.visitor) ||
!dequal(prevState.roomUpdate.status, roomUpdate.status) ||
prevState.joined !== joined
@ -631,6 +632,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
const { room, member, joined, canForwardGuest, canReturnQueue, canViewCannedResponse, canPlaceLivechatOnHold } = this.state;
const { navigation, isMasterDetail } = this.props;
if (isMasterDetail) {
// @ts-ignore
navigation.navigate('ModalStackNavigator', {
screen: screen ?? 'RoomActionsView',
params: {