|
|
|
@ -6,8 +6,9 @@ import useConversationStore from '@/stores/ConversationStore';
|
|
|
|
|
import { useShallow } from 'zustand/react/shallow';
|
|
|
|
|
import { isEmpty, olog } from '@/utils/utils';
|
|
|
|
|
|
|
|
|
|
const MessagesList = ({ reference, ...props }) => {
|
|
|
|
|
const MessagesList = ({ reference, contactsModalOpen, setContactsModalOpen, ...props }) => {
|
|
|
|
|
const setReferenceMsg = useConversationStore(useShallow((state) => state.setReferenceMsg));
|
|
|
|
|
olog('render message list');
|
|
|
|
|
|
|
|
|
|
const scrollToMessage = (id, index) => {
|
|
|
|
|
const _i = index || props.dataSource.findIndex((msg) => msg.id === id);
|
|
|
|
@ -137,23 +138,7 @@ const MessagesList = ({ reference, ...props }) => {
|
|
|
|
|
})}
|
|
|
|
|
{...(message.type === 'meetingLink'
|
|
|
|
|
? {
|
|
|
|
|
actionButtons:
|
|
|
|
|
message.data.length === 1
|
|
|
|
|
? [
|
|
|
|
|
{
|
|
|
|
|
onClickButton: () => {
|
|
|
|
|
alert(`发消息 ${message.text}`);
|
|
|
|
|
},
|
|
|
|
|
Component: () => <div>发消息</div>,
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: [
|
|
|
|
|
{
|
|
|
|
|
onClickButton: () => {
|
|
|
|
|
alert(`${message.text}`);
|
|
|
|
|
},
|
|
|
|
|
Component: () => <div>查看</div>, // 弹窗查看和发消息
|
|
|
|
|
},
|
|
|
|
|
actionButtons: [
|
|
|
|
|
{
|
|
|
|
|
onClickButton: () => {
|
|
|
|
|
navigator.clipboard.writeText(message.text);
|
|
|
|
|