feat: lots of updates

This commit is contained in:
zerosoul
2022-02-10 23:35:25 +08:00
parent e8b6c2b0f1
commit d05c5ff8f2
33 changed files with 1072 additions and 331 deletions
+2 -1
View File
@@ -10,12 +10,13 @@ const userMsgSlice = createSlice({
const {
id,
content,
content_type,
created_at,
mid,
from_uid,
unread = true,
} = action.payload;
const newMsg = { content, created_at, from_uid, unread };
const newMsg = { content, content_type, created_at, from_uid, unread };
if (state[id]) {
let replaceMsg = state[id][mid];
// 如果存在,并且新消息和缓存消息不一样,则替换掉