mirror of
https://github.com/zadam/trilium.git
synced 2026-01-18 04:24:23 +01:00
fix(tree): not reacting to note reordering (e.g. sort)
This commit is contained in:
parent
8a6495a0bd
commit
cc4ceb975e
@ -1232,7 +1232,9 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
refreshCtx.noteIdsToUpdate.add(noteId);
|
||||
}
|
||||
|
||||
if (refreshCtx.noteIdsToUpdate.size + refreshCtx.noteIdsToReload.size > 0) {
|
||||
const hasNotesToUpdateOrReload = refreshCtx.noteIdsToUpdate.size + refreshCtx.noteIdsToReload.size > 0;
|
||||
const hasNoteReorderingChange = loadResults.getNoteReorderings().length > 0;
|
||||
if (hasNotesToUpdateOrReload || hasNoteReorderingChange) {
|
||||
await this.#executeTreeUpdates(refreshCtx, loadResults);
|
||||
}
|
||||
|
||||
@ -1393,6 +1395,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
|
||||
for (const parentNoteId of loadResults.getNoteReorderings()) {
|
||||
for (const node of this.getNodesByNoteId(parentNoteId)) {
|
||||
console.log("Reordering ", node);
|
||||
if (node.isLoaded()) {
|
||||
this.sortChildren(node);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user