faster opening of the date notes (no animation)

This commit is contained in:
zadam 2019-04-14 18:16:15 +02:00
parent 71916b5e28
commit 1bd769827d
4 changed files with 6 additions and 2 deletions

Binary file not shown.

View file

@ -117,7 +117,7 @@ $("body").on("click", "a.external", function () {
if (utils.isElectron()) {
require('electron').ipcRenderer.on('create-day-sub-note', async function(event) {
const todayNote = await dateNoteService.getTodayNote();
const node = await treeService.expandToNote(todayNote.noteId);
const node = await treeService.expandToNote(todayNote.noteId, {noAnimation: true});
await treeService.createNote(node, todayNote.noteId, 'into', {
type: "text",

View file

@ -151,7 +151,7 @@ async function activateNote(notePath, noteLoadedListener) {
glob.activeDialog.modal('hide');
}
const node = await expandToNote(notePath);
const node = await expandToNote(notePath, {noAnimation: true});
if (noteLoadedListener) {
noteDetailService.addDetailLoadedListener(node.data.noteId, noteLoadedListener);

View file

@ -96,6 +96,10 @@ class TreeCache {
const resp = await server.post('tree/load', { noteIds: missingNoteIds });
this.addResp(resp.notes, resp.branches, resp.relations);
for (const note of resp.notes) {
await this.reloadParents(note.noteId);
}
}
return noteIds.map(noteId => {