mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
add back .isDeleted property to becca's note, branch and attribute entities for BC, fixes #2268
This commit is contained in:
@@ -27,6 +27,19 @@ function subscribe(eventTypes, listener) {
|
||||
}
|
||||
}
|
||||
|
||||
function subscribeBeccaLoader(eventTypes, listener) {
|
||||
if (!Array.isArray(eventTypes)) {
|
||||
eventTypes = [ eventTypes ];
|
||||
}
|
||||
|
||||
for (const eventType of eventTypes) {
|
||||
eventListeners[eventType] = eventListeners[eventType] || [];
|
||||
// becca loader should be the first listener so that other listeners can already work
|
||||
// with updated becca
|
||||
eventListeners[eventType] = [listener, ...eventListeners[eventType]];
|
||||
}
|
||||
}
|
||||
|
||||
function emit(eventType, data) {
|
||||
const listeners = eventListeners[eventType];
|
||||
|
||||
@@ -45,6 +58,7 @@ function emit(eventType, data) {
|
||||
|
||||
module.exports = {
|
||||
subscribe,
|
||||
subscribeBeccaLoader,
|
||||
emit,
|
||||
// event types:
|
||||
NOTE_TITLE_CHANGED,
|
||||
|
||||
Reference in New Issue
Block a user