perf(前端): 会话列表显示渠道图标

dev/supplier-email-drawer
Lei OT 9 months ago
parent c0d70f810d
commit 950de6573f

@ -186,7 +186,8 @@
margin-top: 0; margin-top: 0;
/* margin-left: 5px; */ /* margin-left: 5px; */
padding: 5px; padding: 5px;
justify-content: flex-start; /* justify-content: flex-start; */
justify-content: center;
font-size: 12px; font-size: 12px;
/* word-wrap: break-word; */ /* word-wrap: break-word; */
text-wrap: nowrap; text-wrap: nowrap;

@ -255,6 +255,7 @@ const ChatListItem = (({item, refreshConversationList,setListUpdateFlag,onSwitch
key={item.sn} key={item.sn}
id={item.sn} id={item.sn}
letterItem={{ id: item.show_default, letter: (item?.show_default || '').split("@")[0].slice(0, 5) }} letterItem={{ id: item.show_default, letter: (item?.show_default || '').split("@")[0].slice(0, 5) }}
// letterItem={{ id: '', letter: '' }}
alt={item.whatsapp_name} alt={item.whatsapp_name}
title={ title={
<span> <span>
@ -289,6 +290,8 @@ const ChatListItem = (({item, refreshConversationList,setListUpdateFlag,onSwitch
date={item.lasttime || item.last_received_time || item.last_send_time} date={item.lasttime || item.last_received_time || item.last_send_time}
dateString='' // : , , dataString dateString='' // : , , dataString
unread={item.unread_msg_count > 99 ? 0 : item.unread_msg_count} unread={item.unread_msg_count > 99 ? 0 : item.unread_msg_count}
// muted={item.unread_msg_count>0}
// showMute={item.unread_msg_count>0}
// className={[ // className={[
// String(item.sn) === String(currentConversation.sn) ? '__active text-primary bg-whatsapp-bg' : '', // String(item.sn) === String(currentConversation.sn) ? '__active text-primary bg-whatsapp-bg' : '',
// String(item.sn) === String(tabSelectedConversation?.sn) ? ' bg-neutral-200' : '', // String(item.sn) === String(tabSelectedConversation?.sn) ? ' bg-neutral-200' : '',
@ -297,10 +300,10 @@ const ChatListItem = (({item, refreshConversationList,setListUpdateFlag,onSwitch
statusText={ statusText={
<ChannelLogo <ChannelLogo
channel={flush([ channel={flush([
item?.channels?.phone_number ? 'phone' : null, item?.channels?.phone_number ? 'waba' : null,
item?.channels?.email ? 'email' : null, item?.channels?.email ? 'email' : null,
item?.channels?.whatsapp_phone_number ? 'waba' : null, item?.channels?.whatsapp_phone_number ? 'waba' : null,
item?.last_message?.type === 'email' ? 'email' : null, item?.last_message?.source || null, // wai, WABA, email
])} ])}
/> />
} }

Loading…
Cancel
Save