mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
filter out empty thread
This commit is contained in:
parent
433884b36c
commit
9756ab6d16
1 changed files with 3 additions and 1 deletions
|
|
@ -28,7 +28,9 @@ export const SidebarThreadSelector = () => {
|
|||
const { allThreads } = threadsState
|
||||
|
||||
// sorted by most recent to least recent
|
||||
const sortedThreadIds = Object.keys(allThreads ?? {}).sort((threadId1, threadId2) => allThreads![threadId1].lastModified > allThreads![threadId2].lastModified ? -1 : 1)
|
||||
const sortedThreadIds = Object.keys(allThreads ?? {})
|
||||
.sort((threadId1, threadId2) => allThreads![threadId1].lastModified > allThreads![threadId2].lastModified ? -1 : 1)
|
||||
.filter(threadId => allThreads![threadId].messages.length !== 0)
|
||||
|
||||
return (
|
||||
<div className="flex p-2 flex-col mb-2 gap-y-1 max-h-[400px] overflow-y-auto">
|
||||
|
|
|
|||
Loading…
Reference in a new issue