Skip to content

Commit

Permalink
Merge pull request #19 from hecom-rn/hanhu
Browse files Browse the repository at this point in the history
修复安卓端 - 未读标记在杀掉应用再打开,标记消失的问题
  • Loading branch information
summer88123 authored Jan 14, 2021
2 parents 32c630d + 6555c24 commit ed5403f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions standard/model/external.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export async function onMessageReceived(
ext.extend_message_body.messageType == 5) {
originMessage.ext.shouldRead = true;
delegate.im.conversation.updateMessageExt(originMessage.messageId, originMessage.ext);
} else {
originMessage.ext.shouldRead = false;
delegate.im.conversation.updateMessageExt(originMessage.messageId, originMessage.ext);
}

const message = Action.Parse.get([], originMessage, originMessage);
Expand Down
2 changes: 1 addition & 1 deletion standard/model/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export async function sendMessage(
isSystem: boolean = false,
autoTimestamp: boolean = true,
): Promise<void> {
ext = {...ext, innerId: message.innerId};
ext = {...ext, innerId: message.innerId, shouldRead: true};
const sendEventName = [Event.Base, Event.SendMessage, imId];
if (!delegate.model.Conversation.getOne(imId, false)) {
await delegate.model.Conversation.loadItem(imId, chatType);
Expand Down

0 comments on commit ed5403f

Please sign in to comment.