global note map should respect hoisting, #2365

This commit is contained in:
zadam
2021-11-21 10:40:48 +01:00
parent 1dce96b4c1
commit ae29c6bac4
5 changed files with 194 additions and 197 deletions

View File

@@ -35,7 +35,7 @@ async function checkNoteAccess(notePath, noteContext) {
const hoistedNoteId = noteContext.hoistedNoteId;
if (!resolvedNotePath.includes(hoistedNoteId)) {
if (!resolvedNotePath.includes(hoistedNoteId) && !resolvedNotePath.includes("hidden")) {
const confirmDialog = await import('../dialogs/confirm.js');
if (!await confirmDialog.confirm("Requested note is outside of hoisted note subtree and you must unhoist to access the note. Do you want to proceed with unhoisting?")) {

View File

@@ -237,7 +237,7 @@ export default class TabManager extends Component {
if (noteContext) {
const resolvedNotePath = await treeService.resolveNotePath(notePath, noteContext.hoistedNoteId);
if (resolvedNotePath.includes(noteContext.hoistedNoteId)) {
if (resolvedNotePath.includes(noteContext.hoistedNoteId) || resolvedNotePath.includes("hidden")) {
hoistedNoteId = noteContext.hoistedNoteId;
}
}