Commit fe6ab1be by Sixong.Zhu

update

parent e1a7be9b
Showing with 10 additions and 10 deletions
......@@ -15,7 +15,7 @@ import { getChatModelInfo } from "../utils/chat-info";
import { ChatUserInfoService } from "../utils/user-info";
import Chat from "../xim";
import { Chat as ChatType, Message } from "../xim/models/chat";
import xim, { ChatNotifyListener, Xim } from "../xim/xim";
import xim, { ChatNotifyListener } from "../xim/xim";
import { decodeJwt } from "uniplat-sdk";
import { ChatStatus, ChatStore, ChatStoreState } from "./model";
......@@ -32,7 +32,7 @@ function uniqueMessages(
messages: NonNullable<ChatStore.STATE_CHAT_MSG_HISTORY>
) {
const arr = [...messages];
return unique(arr, function (item, all) {
return unique(arr, function(item, all) {
return all.findIndex((k) => k.id === item.id);
});
}
......@@ -366,7 +366,7 @@ export default {
state[ChatStore.STATE_CHAT_SENDING_MESSAGES] = [...current];
}
},
[ChatStore.MUTATION_SAVE_CURRENT_CHAT_INPUTING]: (function () {
[ChatStore.MUTATION_SAVE_CURRENT_CHAT_INPUTING]: (function() {
const setTimeoutId: { [key: string]: number } = {};
return (
state: ChatStoreState,
......@@ -862,7 +862,7 @@ export default {
await getChatModelInfo(
wantedChatRoom.model_name,
wantedChatRoom.obj_id,
wantedChatRoom.detail_name
Chat.isBackend() ? wantedChatRoom.detail_name : ''
)
.then((info) => {
commit(
......@@ -940,7 +940,7 @@ export default {
}
commit(
ChatStore.MUTATION_SAVE_CURRENT_CHAT_MEMBERS,
unique(newChatMembers, function (item, all) {
unique(newChatMembers, function(item, all) {
return all.findIndex((k) => k.eid === item.eid);
})
);
......@@ -966,7 +966,7 @@ export default {
await getChatModelInfo(
firstChat.model_name,
firstChat.obj_id,
firstChat.detail_name
Chat.isBackend() ? firstChat.detail_name : ''
);
await dispatch(
ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION,
......@@ -1197,8 +1197,8 @@ export default {
p.read_count = option.all
? p.total_read_count
: option.readed
? option.readed
: p.read_count + 1;
? option.readed
: p.read_count + 1;
}
}
} else {
......@@ -1207,8 +1207,8 @@ export default {
p.read_count = option.all
? p.total_read_count
: option.readed
? option.readed
: p.read_count + 1;
? option.readed
: p.read_count + 1;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment