mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-10 03:53:37 -06:00
fix(client/collections): collections not visible after viewing attachments
This commit is contained in:
parent
f83c46d1c7
commit
0a3e788d21
@ -51,12 +51,12 @@ const ViewComponents: Record<ViewTypeOptions, { normal: LazyLoadedComponent, pri
|
||||
}
|
||||
|
||||
export default function NoteList(props: Pick<NoteListProps, "displayOnlyCollections" | "media" | "onReady" | "onProgressChanged">) {
|
||||
const { note, noteContext, notePath, ntxId } = useNoteContext();
|
||||
const { note, noteContext, notePath, ntxId, viewScope } = useNoteContext();
|
||||
const viewType = useNoteViewType(note);
|
||||
const [ enabled, setEnabled ] = useState(noteContext?.hasNoteList());
|
||||
useEffect(() => {
|
||||
setEnabled(noteContext?.hasNoteList());
|
||||
}, [ noteContext, viewType ])
|
||||
}, [ noteContext, viewType, viewScope?.viewMode ])
|
||||
return <CustomNoteList viewType={viewType} note={note} isEnabled={!!enabled} notePath={notePath} ntxId={ntxId} {...props} />
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user