From b346ab8372bc6a767b5d8b3beca5dfcc0b65f48e Mon Sep 17 00:00:00 2001 From: Gerzon Z Date: Wed, 4 May 2022 12:02:26 -0400 Subject: [PATCH] update: validation for on-hold remove: unused variable --- app/containers/MessageBox/index.tsx | 3 +-- app/views/RoomView/index.tsx | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/containers/MessageBox/index.tsx b/app/containers/MessageBox/index.tsx index c75ccaddb..5a098635f 100644 --- a/app/containers/MessageBox/index.tsx +++ b/app/containers/MessageBox/index.tsx @@ -314,8 +314,7 @@ class MessageBox extends Component { tshow, mentionLoading, trackingType, - permissionToUpload, - canViewCannedResponse + permissionToUpload } = this.state; const { roomType, replying, editing, isFocused, message, theme, usedCannedResponse, uploadFilePermission } = this.props; diff --git a/app/views/RoomView/index.tsx b/app/views/RoomView/index.tsx index ed88c0b5b..2395bb9ff 100644 --- a/app/views/RoomView/index.tsx +++ b/app/views/RoomView/index.tsx @@ -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 { // 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 { 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: {