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, tshow,
mentionLoading, mentionLoading,
trackingType, trackingType,
permissionToUpload, permissionToUpload
canViewCannedResponse
} = this.state; } = this.state;
const { roomType, replying, editing, isFocused, message, theme, usedCannedResponse, uploadFilePermission } = this.props; const { roomType, replying, editing, isFocused, message, theme, usedCannedResponse, uploadFilePermission } = this.props;

View File

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