From 550073a73a4ee8c41142a9bdaff5347382bd1c29 Mon Sep 17 00:00:00 2001
From: yj <1336058017@qq.com>
Date: Tue, 25 Feb 2025 15:20:38 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/page/Home/index.tsx | 3 ++-
src/page/Meeting/index.tsx | 36 ++++++++++++++++++++----------------
2 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/src/page/Home/index.tsx b/src/page/Home/index.tsx
index 6e25b8e..b0e1c3b 100644
--- a/src/page/Home/index.tsx
+++ b/src/page/Home/index.tsx
@@ -127,7 +127,8 @@ const Home: React.FC = () => {
})}
- 版本号:{version}
+ 版本号:{version}
+ {/* new */}
{
const sendMsg = (text?: string): void => {
let msg = text ? text : textMsg;
if (msg) {
- window.electron.onInvoke('sendChannelMsg', {
- roomNum: state.channelId,
- msg: msg,
- })
- let item = {
- uid: userInfo.uid,
- userName: userInfo.userName,
- message: msg,
- timestamp: +new Date()
- }
- setChatList((newChatList: any) => [...newChatList, item])
- window.electron.windowHandleMessage({
- key: 'chatSmallWindow',
- parmes: {
- chatListIten: item,
+ setRoomUserItem((res: any) => {
+ let row = res.find((item: any) => item.uid === userInfo.uid)
+ window.electron.onInvoke('sendChannelMsg', {
+ roomNum: state.channelId,
+ msg: msg,
+ })
+ let item = {
+ uid: userInfo.uid,
+ userName: row.userName,
+ message: msg,
+ timestamp: +new Date()
}
+ setChatList((newChatList: any) => [...newChatList, item])
+ window.electron.windowHandleMessage({
+ key: 'chatSmallWindow',
+ parmes: {
+ chatListIten: item,
+ }
+ })
+ chatScrollBotton()
+ return res
})
- chatScrollBotton()
} else {
message.error('请输入内容!')
}