fix(collections): not reacting to changes in reordering

This commit is contained in:
Elian Doran
2026-04-10 11:35:32 +03:00
parent 1554c9907e
commit 7efc36efef

View File

@@ -180,11 +180,13 @@ export function useNoteIds(note: FNote | null | undefined, viewType: ViewTypeOpt
// Refresh on alterations to the note subtree.
useTriliumEvent("entitiesReloaded", ({ loadResults }) => {
if (note && loadResults.getBranchRows().some(branch =>
branch.parentNoteId === note.noteId
|| noteIds.includes(branch.parentNoteId ?? ""))
if (note && (
loadResults.getNoteReorderings().includes(note.noteId)
|| loadResults.getBranchRows().some(branch =>
branch.parentNoteId === note.noteId
|| noteIds.includes(branch.parentNoteId ?? ""))
|| loadResults.getAttributeRows().some(attr => attr.name === "archived" && attr.noteId && noteIds.includes(attr.noteId))
) {
)) {
refreshNoteIds();
}
});