mirror of
https://github.com/zadam/trilium.git
synced 2024-09-22 08:36:10 +08:00
fix erasing notes - becca should be reloaded afterwards, closes #3146
This commit is contained in:
parent
d4658b9c2a
commit
fc43d9222a
|
@ -27,6 +27,8 @@ class Becca {
|
|||
/** @type {Object.<String, EtapiToken>} */
|
||||
this.etapiTokens = {};
|
||||
|
||||
this.dirtyNoteSetCache();
|
||||
|
||||
this.loaded = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -735,6 +735,10 @@ function eraseDeletedEntities(eraseEntitiesAfterTimeInSeconds = null) {
|
|||
const attributeIdsToErase = sql.getColumn("SELECT attributeId FROM attributes WHERE isDeleted = 1 AND utcDateModified <= ?", [dateUtils.utcDateTimeStr(cutoffDate)]);
|
||||
|
||||
eraseAttributes(attributeIdsToErase);
|
||||
|
||||
if (noteIdsToErase.length > 0 || branchIdsToErase.length > 0 || attributeIdsToErase.length > 0) {
|
||||
require('../becca/becca_loader').reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -750,6 +754,10 @@ function eraseNotesWithDeleteId(deleteId) {
|
|||
const attributeIdsToErase = sql.getColumn("SELECT attributeId FROM attributes WHERE deleteId = ?", [deleteId]);
|
||||
|
||||
eraseAttributes(attributeIdsToErase);
|
||||
|
||||
if (noteIdsToErase.length > 0 || branchIdsToErase.length > 0 || attributeIdsToErase.length > 0) {
|
||||
require('../becca/becca_loader').reload();
|
||||
}
|
||||
}
|
||||
|
||||
function eraseDeletedNotesNow() {
|
||||
|
|
Loading…
Reference in a new issue