@tencentcloud/chat-uikit-wechat
Advanced tools
Comparing version 2.2.7 to 2.3.7
@@ -0,1 +1,5 @@ | ||
## 2.3.7 (2024-12-23) | ||
### 优化 | ||
- 优化重发消息后不更新消息列表 | ||
## 2.2.7 (2024-09-05) | ||
@@ -2,0 +6,0 @@ ### 优化 |
@@ -83,4 +83,2 @@ import dayjs from '../../../../utils/dayjs'; | ||
newArr: {}, | ||
errorMessage: {}, | ||
errorMessageID: '', | ||
typingMessage: {}, | ||
@@ -93,3 +91,2 @@ // 是否在最底部 | ||
refreshStatus: false, | ||
selfMessageMap: {}, | ||
}, | ||
@@ -300,5 +297,5 @@ | ||
if (index > -1) { | ||
this.data.selfMessageMap[message.ID] = message; | ||
this.data.messageList[index] = message; | ||
this.setData({ | ||
selfMessageMap: this.data.selfMessageMap | ||
messageList: this.data.messageList, | ||
}) | ||
@@ -312,3 +309,2 @@ return; | ||
const { BUSINESS_ID_TEXT, MESSAGE_TYPE_TEXT } = constant; | ||
// this.$onMessageReadByPeer(); | ||
this.messageTimeForShow(message); | ||
@@ -569,6 +565,3 @@ if (message.type === MESSAGE_TYPE_TEXT.TIM_CUSTOM_ELEM) { | ||
sendMessageError(event) { | ||
this.setData({ | ||
errorMessage: event.detail.message, | ||
errorMessageID: event.detail.message.ID, | ||
}); | ||
this.updateMessageList(event.detail.message); | ||
const errorCode = event.detail.showErrorImageFlag; | ||
@@ -578,3 +571,4 @@ this.handleErrorCode(errorCode); | ||
// 消息发送失败后重新发送 | ||
ResendMessage() { | ||
ResendMessage(event) { | ||
const ID = event.target.dataset.value; | ||
const { TOAST_TITLE_TEXT } = constant; | ||
@@ -587,4 +581,6 @@ wx.showModal({ | ||
} | ||
wx.$TUIKit.resendMessage(this.data.errorMessage) // 传入需要重发的消息实例 | ||
.then(() => { | ||
const failMessage = this.data.messageList.find(item => (item.ID === ID)); | ||
wx.$TUIKit.resendMessage(failMessage) // 传入需要重发的消息实例 | ||
.then((res) => { | ||
this.updateMessageList(res.data.message); | ||
this.showToast(TOAST_TITLE_TEXT.RESEND_SUCCESS); | ||
@@ -591,0 +587,0 @@ this.setData({ |
{ | ||
"name": "@tencentcloud/chat-uikit-wechat", | ||
"version": "2.2.7", | ||
"version": "2.3.7", | ||
"description": "TUIKit 是基于 Chat SDK 实现的一套 UI 组件,其包含会话、聊天、群组、个人资料等功能,基于 TUIKit 组件您可以像搭积木一样快速搭建起自己的业务逻辑。", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
476001
6012