|
|
|
@ -159,6 +159,7 @@ const Conversations = () => {
|
|
|
|
|
return () => {};
|
|
|
|
|
}, [conversationsList, topList, pageList, listUpdateFlag, currentConversation.unread_msg_count]);
|
|
|
|
|
|
|
|
|
|
let orderChatRefreshing = false;
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
// console.log('effect get order c');
|
|
|
|
|
|
|
|
|
@ -171,6 +172,10 @@ const Conversations = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getOrderConversationList = async (colisn) => {
|
|
|
|
|
if (orderChatRefreshing !== false) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
orderChatRefreshing = true;
|
|
|
|
|
|
|
|
|
|
const { whatsapp_phone_number } = switchToC;
|
|
|
|
|
const whatsappID = coli_guest_WhatsApp || whatsapp_phone_number || '';
|
|
|
|
@ -216,6 +221,7 @@ const Conversations = () => {
|
|
|
|
|
findCurrentIndex = conversationsList.findIndex((item) => `${item.coli_sn}` === `${colisn}`);
|
|
|
|
|
findCurrent = conversationsList[findCurrentIndex];
|
|
|
|
|
}
|
|
|
|
|
orderChatRefreshing = false;
|
|
|
|
|
if (findCurrentIndex >= 0) {
|
|
|
|
|
setCurrentConversation(findCurrent);
|
|
|
|
|
return findCurrent;
|
|
|
|
|