fix for delete note sync etc.

This commit is contained in:
zadam
2020-02-10 20:57:56 +01:00
parent 7767edd82f
commit 1d2fc773c2
13 changed files with 91 additions and 93 deletions

View File

@@ -77,21 +77,20 @@ export default class Entrypoints extends Component {
appContext.trigger('focusAndSelectTitle');
}
toggleNoteHoistingListener() {
async toggleNoteHoistingListener() {
const note = appContext.tabManager.getActiveTabNote();
hoistedNoteService.getHoistedNoteId().then(async hoistedNoteId => {
if (note.noteId === hoistedNoteId) {
hoistedNoteService.unhoist();
}
else {
const note = await treeCache.getNote(note.noteId);
const hoistedNoteId = hoistedNoteService.getHoistedNoteId();
if (note.noteId === hoistedNoteId) {
hoistedNoteService.unhoist();
}
else {
const note = await treeCache.getNote(note.noteId);
if (note.type !== 'search') {
hoistedNoteService.setHoistedNoteId(note.noteId);
}
if (note.type !== 'search') {
hoistedNoteService.setHoistedNoteId(note.noteId);
}
});
}
}
copyWithoutFormattingListener() {