|
|
@ -91,8 +91,8 @@ const Conversations = () => {
|
|
|
|
if (!isEmpty(data)) {
|
|
|
|
if (!isEmpty(data)) {
|
|
|
|
addToConversationList(data);
|
|
|
|
addToConversationList(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// const ifCurrent = data.findIndex((item) => item.sn === currentConversation.sn);
|
|
|
|
let ifCurrent = data.findIndex((item) => item.sn === currentConversation.sn);
|
|
|
|
const ifCurrent = conversationsList.findIndex((item) => item.coli_sn === Number(colisn));
|
|
|
|
ifCurrent = ifCurrent !== -1 ? ifCurrent : conversationsList.findIndex((item) => item.coli_sn === Number(colisn));
|
|
|
|
if (ifCurrent !== -1) {
|
|
|
|
if (ifCurrent !== -1) {
|
|
|
|
switchConversation(conversationsList[ifCurrent === -1 ? 0 : ifCurrent]);
|
|
|
|
switchConversation(conversationsList[ifCurrent === -1 ? 0 : ifCurrent]);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|