mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
changed import progress notification so it shows up for drag & drop as well
This commit is contained in:
@@ -13,7 +13,7 @@ const ImportContext = require('../../services/import_context');
|
||||
|
||||
async function importToBranch(req) {
|
||||
const {parentNoteId} = req.params;
|
||||
const {importId} = req.body;
|
||||
const {importId, last} = req.body;
|
||||
|
||||
const options = {
|
||||
safeImport: req.body.safeImport !== 'false',
|
||||
@@ -65,6 +65,11 @@ async function importToBranch(req) {
|
||||
return [500, message];
|
||||
}
|
||||
|
||||
if (last === "true") {
|
||||
// small timeout to avoid race condition (message is received before the transaction is committed)
|
||||
setTimeout(() => importContext.importSucceeded(parentNoteId, note.noteId), 1000);
|
||||
}
|
||||
|
||||
// import has deactivated note events so note cache is not updated
|
||||
// instead we force it to reload (can be async)
|
||||
noteCacheService.load();
|
||||
|
||||
Reference in New Issue
Block a user