mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-26 01:21:34 +08:00
not refreshing tree after sort operation because it messes with everything ...
This commit is contained in:
parent
1bd769827d
commit
47cb7c7f5e
@ -5,6 +5,9 @@ import infoService from "./info.js";
|
|||||||
import messagingService from "./messaging.js";
|
import messagingService from "./messaging.js";
|
||||||
import server from "./server.js";
|
import server from "./server.js";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TreeCache keeps a read only cache of note tree structure in frontend's memory.
|
||||||
|
*/
|
||||||
class TreeCache {
|
class TreeCache {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.init();
|
this.init();
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
const eventService = require('./events');
|
const eventService = require('./events');
|
||||||
const scriptService = require('./script');
|
const scriptService = require('./script');
|
||||||
const treeService = require('./tree');
|
const treeService = require('./tree');
|
||||||
const messagingService = require('./messaging');
|
|
||||||
const log = require('./log');
|
const log = require('./log');
|
||||||
const Attribute = require('../entities/attribute');
|
const Attribute = require('../entities/attribute');
|
||||||
|
|
||||||
@ -29,9 +28,6 @@ eventService.subscribe(eventService.NOTE_TITLE_CHANGED, async note => {
|
|||||||
for (const parent of parents) {
|
for (const parent of parents) {
|
||||||
if (await parent.hasLabel("sorted")) {
|
if (await parent.hasLabel("sorted")) {
|
||||||
await treeService.sortNotesAlphabetically(parent.noteId);
|
await treeService.sortNotesAlphabetically(parent.noteId);
|
||||||
|
|
||||||
messagingService.refreshTree();
|
|
||||||
break; // sending the message once is enough
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user