Browse Source

防止极端情况下消息串扰问题

master
xsx 9 months ago
parent
commit
faa3533306
  1. 4
      im-uniapp/pages/chat/chat-box.vue
  2. 5
      im-web/src/components/chat/ChatBox.vue

4
im-uniapp/pages/chat/chat-box.vue

@ -309,9 +309,11 @@ export default {
this.isReceipt = false;
// id
this.fillTargetId(msgInfo, this.chat.targetId);
//
const chat = this.chat;
this.sendMessageRequest(msgInfo).then((m) => {
m.selfSend = true;
this.chatStore.insertMessage(m, this.chat);
this.chatStore.insertMessage(m, chat);
//
this.moveChatToTop();
}).finally(() => {

5
im-web/src/components/chat/ChatBox.vue

@ -456,13 +456,12 @@ export default {
msgInfo.receipt = this.isReceipt;
}
this.lockMessage = true;
const chat = this.chat;
this.sendMessageRequest(msgInfo).then((m) => {
m.selfSend = true;
this.chatStore.insertMessage(m, this.chat);
//
this.chatStore.insertMessage(m, chat);
this.moveChatToTop();
}).finally(() => {
//
this.scrollToBottom();
this.isReceipt = false;
resolve();

Loading…
Cancel
Save