mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 05:41:33 +02:00
Merge pull request #23998 from overleaf/td-resolved-thread-count
Fix for resolved thread count display GitOrigin-RevId: c4f6848ed2e952981d20f157466db6dded99c3c9
This commit is contained in:
@@ -50,18 +50,18 @@ export const ReviewPanelResolvedThreadsMenu: FC = () => {
|
||||
return []
|
||||
}
|
||||
|
||||
const resolvedThreads = []
|
||||
const allResolvedThreads = []
|
||||
for (const [id, thread] of Object.entries(threads)) {
|
||||
if (thread.resolved) {
|
||||
resolvedThreads.push({ thread, id })
|
||||
allResolvedThreads.push({ thread, id })
|
||||
}
|
||||
}
|
||||
resolvedThreads.sort((a, b) => {
|
||||
allResolvedThreads.sort((a, b) => {
|
||||
return Date.parse(b.thread.resolved_at) - Date.parse(a.thread.resolved_at)
|
||||
})
|
||||
|
||||
return resolvedThreads
|
||||
}, [threads])
|
||||
return allResolvedThreads.filter(thread => allComments.has(thread.id))
|
||||
}, [threads, allComments])
|
||||
|
||||
if (loading) {
|
||||
return <LoadingSpinner className="ms-auto me-auto" />
|
||||
|
||||
Reference in New Issue
Block a user