perf: 优化聊天体验,移除发送图片和文件后的重新加载

This commit is contained in:
QDKF 2025-09-23 17:37:58 +08:00
parent 2a7da14df5
commit ce6a0d41eb

View File

@ -1661,9 +1661,8 @@ const handleImage = async (imageData: any) => {
// 使IDID
await updateLastReadMessage(imageMessage.id)
//
console.log('🔄 重新加载消息列表以确认服务器数据...')
await loadMessages(activeContactId.value)
//
console.log('✅ 图片消息发送成功,无需重新加载')
} else {
console.warn('⚠️ 服务器未返回图片消息ID跳过更新最后读取消息')
}
@ -1786,9 +1785,8 @@ const handleFile = async (fileData: any) => {
// 使IDID
await updateLastReadMessage(fileMessage.id)
//
console.log('🔄 重新加载消息列表以确认服务器数据...')
await loadMessages(activeContactId.value)
//
console.log('✅ 文件消息发送成功,无需重新加载')
} else {
console.warn('⚠️ 服务器未返回文件消息ID跳过更新最后读取消息')
}
@ -2442,7 +2440,7 @@ onMounted(() => {
top: 0;
right: 0;
width: 315px;
height: 76%;
height: 77%;
background: #ffffff;
z-index: 10;
animation: slideInRight 0.3s ease-out;