Skip to content

Build your personal knowledge base with Trilium Notes

import doesn't need a full tree reload

zadamc6806256fd18
diff --git a/src/public/javascripts/desktop.js b/src/public/javascripts/desktop.js
index 189a8f07f1..8650d22ec5 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 644c9a2b1c..2402ca2979 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);