fix: sorted-thread-not-stable (#5336)

This commit is contained in:
Sam Hoang Van 2025-06-18 09:39:18 +07:00 committed by GitHub
parent 06be778e98
commit b30de3d1ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,11 +32,6 @@ export const useThreads = create<ThreadState>()((set, get) => ({
threads: {},
searchIndex: null,
setThreads: (threads) => {
threads.forEach((thread) => {
updateThread({
...thread,
})
})
const threadMap = threads.reduce(
(acc: Record<string, Thread>, thread) => {
acc[thread.id] = thread