From c6806256fd184dd544e404c02a936d87a3c97abc Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 31 Mar 2019 19:13:17 +0200 Subject: [PATCH] import doesn't need a full tree reload --- src/public/javascripts/desktop.js | 5 ----- src/public/javascripts/dialogs/import.js | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/public/javascripts/desktop.js b/src/public/javascripts/desktop.js index 189a8f07f..8650d22ec 100644 --- a/src/public/javascripts/desktop.js +++ b/src/public/javascripts/desktop.js @@ -115,11 +115,6 @@ $("body").on("click", "a.external", function () { if (utils.isElectron()) { require('electron').ipcRenderer.on('create-day-sub-note', async function(event, parentNoteId) { - // this might occur when day note had to be created - if (!await treeCache.getNote(parentNoteId)) { - await treeService.reload(); - } - await treeService.activateNote(parentNoteId); setTimeout(async () => { diff --git a/src/public/javascripts/dialogs/import.js b/src/public/javascripts/dialogs/import.js index 644c9a2b1..2402ca297 100644 --- a/src/public/javascripts/dialogs/import.js +++ b/src/public/javascripts/dialogs/import.js @@ -98,7 +98,7 @@ async function uploadFiles(importNoteId, files, options) { infoService.showMessage("Import finished successfully."); - await treeService.reload(); + await treeService.reloadNote(importNoteId); if (noteId) { const node = await treeService.activateNote(noteId);