mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 07:16:51 +00:00
修复通知内部分组件显示异常;修复结束引导后无法正确连接后端服务的问题;优化了图片密钥的解析速度
This commit is contained in:
@@ -86,15 +86,16 @@ export const useChatStore = create<ChatState>((set, get) => ({
|
||||
if (m.localId && m.localId > 0) return `l:${m.localId}`
|
||||
return `t:${m.createTime}:${m.sortSeq || 0}:${m.serverId || 0}`
|
||||
}
|
||||
const existingKeys = new Set(state.messages.map(getMsgKey))
|
||||
const currentMessages = state.messages || []
|
||||
const existingKeys = new Set(currentMessages.map(getMsgKey))
|
||||
const filtered = newMessages.filter(m => !existingKeys.has(getMsgKey(m)))
|
||||
|
||||
if (filtered.length === 0) return state
|
||||
|
||||
return {
|
||||
messages: prepend
|
||||
? [...filtered, ...state.messages]
|
||||
: [...state.messages, ...filtered]
|
||||
? [...filtered, ...currentMessages]
|
||||
: [...currentMessages, ...filtered]
|
||||
}
|
||||
}),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user