move share root to hidden subtree

This commit is contained in:
zadam 2022-11-06 14:44:26 +01:00
parent 06e6fec4ca
commit 3122d0cc6b
3 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1 @@
UPDATE branches SET parentNoteId = 'hidden' WHERE branchId = 'share';

View File

@ -4,7 +4,7 @@ const build = require('./build');
const packageJson = require('../../package');
const {TRILIUM_DATA_DIR} = require('./data_dir');
const APP_DB_VERSION = 198;
const APP_DB_VERSION = 199;
const SYNC_VERSION = 27;
const CLIPPER_PROTOCOL_VERSION = "1.0";

View File

@ -206,13 +206,15 @@ function getShareRoot() {
let shareRoot = becca.getNote('share');
if (!shareRoot) {
const hiddenRoot = getHiddenRoot();
shareRoot = noteService.createNewNote({
branchId: 'share',
noteId: 'share',
title: 'Shared notes',
type: 'text',
content: '',
parentNoteId: 'root'
parentNoteId: hiddenRoot.noteId
}).note;
}