Merge pull request #23998 from overleaf/td-resolved-thread-count

Fix for resolved thread count display

GitOrigin-RevId: c4f6848ed2e952981d20f157466db6dded99c3c9
This commit is contained in:
Tim Down 2025-03-04 09:22:04 +00:00 committed by Copybot
parent 1f339b37bd
commit cd644320f4

View file

@ -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" />