fix(sidebar): hide folder groups after removing from workspace
This commit is contained in:
@@ -375,20 +375,14 @@ export function SidebarConversationList({
|
|||||||
const orderedFolderIds = useMemo(() => {
|
const orderedFolderIds = useMemo(() => {
|
||||||
const seen = new Set<number>()
|
const seen = new Set<number>()
|
||||||
const ids: number[] = []
|
const ids: number[] = []
|
||||||
for (const f of allFolders) {
|
for (const f of folders) {
|
||||||
if (!seen.has(f.id)) {
|
if (!seen.has(f.id)) {
|
||||||
seen.add(f.id)
|
seen.add(f.id)
|
||||||
ids.push(f.id)
|
ids.push(f.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const id of byFolder.keys()) {
|
|
||||||
if (!seen.has(id)) {
|
|
||||||
seen.add(id)
|
|
||||||
ids.push(id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ids
|
return ids
|
||||||
}, [allFolders, byFolder])
|
}, [folders])
|
||||||
|
|
||||||
const flatItems = useMemo<FlatItem[]>(() => {
|
const flatItems = useMemo<FlatItem[]>(() => {
|
||||||
const items: FlatItem[] = []
|
const items: FlatItem[] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user