mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-24 21:41:30 +08:00
15 lines
496 B
JavaScript
15 lines
496 B
JavaScript
const optionService = require('./options');
|
|
const sqlInit = require('./sql_init');
|
|
const eventService = require('./events');
|
|
const hoistedNote = require('./hoisted_note');
|
|
|
|
eventService.subscribe(eventService.ENTITY_CHANGED, ({entityName, entity}) => {
|
|
if (entityName === 'options' && entity.name === 'hoistedNoteId') {
|
|
hoistedNote.setHoistedNoteId(entity.value);
|
|
}
|
|
});
|
|
|
|
sqlInit.dbReady.then(() => {
|
|
hoistedNote.setHoistedNoteId(optionService.getOption('hoistedNoteId'));
|
|
});
|