|
|
|
@ -52,8 +52,8 @@ const MessagesWrapper = ({ updateRead = true, forceGetMessages }) => {
|
|
|
|
|
}, [activeMessages]);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (updateRead === true && isVisible && currentConversation.opi_sn && currentConversation.whatsapp_phone_number && activeMessages.length > 0) {
|
|
|
|
|
fetchCleanUnreadMsgCount({ opisn: currentConversation.opi_sn, whatsappid: currentConversation.whatsapp_phone_number });
|
|
|
|
|
if (updateRead === true && isVisible && currentConversation.opi_sn && activeMessages.length > 0) {
|
|
|
|
|
fetchCleanUnreadMsgCount({ opisn: currentConversation.opi_sn, conversationid: currentConversation.sn });
|
|
|
|
|
refreshTotalNotify();
|
|
|
|
|
updateCurrentConversation({ unread_msg_count: 0 });
|
|
|
|
|
}
|
|
|
|
|