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

@@ -37,7 +37,7 @@ async function getRunPath(notePath) {
path.push('root');
}
const hoistedNoteId = await hoistedNoteService.getHoistedNoteId();
const hoistedNoteId = hoistedNoteService.getHoistedNoteId();
const effectivePath = [];
let childNoteId = null;
@@ -144,8 +144,8 @@ ws.subscribeToMessages(message => {
}
});
async function getParentProtectedStatus(node) {
return await hoistedNoteService.isRootNode(node) ? 0 : node.getParent().data.isProtected;
function getParentProtectedStatus(node) {
return hoistedNoteService.isRootNode(node) ? 0 : node.getParent().data.isProtected;
}
function getNoteIdFromNotePath(notePath) {
@@ -184,7 +184,7 @@ function getNoteIdAndParentIdFromNotePath(notePath) {
}
}
async function getNotePath(node) {
function getNotePath(node) {
if (!node) {
console.error("Node is null");
return "";
@@ -192,7 +192,7 @@ async function getNotePath(node) {
const path = [];
while (node && !await hoistedNoteService.isRootNode(node)) {
while (node && !hoistedNoteService.isRootNode(node)) {
if (node.data.noteId) {
path.push(node.data.noteId);
}