"move to new window" respects note hoisting of original tab

This commit is contained in:
zadam
2021-02-07 21:27:09 +01:00
parent cd5be59413
commit bed7bdfd00
9 changed files with 38 additions and 14 deletions

View File

@@ -184,11 +184,15 @@ export default class Entrypoints extends Component {
createTopLevelNoteCommand() { noteCreateService.createNewTopLevelNote(); }
async openInWindowCommand({notePath}) {
async openInWindowCommand({notePath, hoistedNoteId}) {
if (!hoistedNoteId) {
hoistedNoteId = 'root';
}
if (utils.isElectron()) {
const {ipcRenderer} = utils.dynamicRequire('electron');
ipcRenderer.send('create-extra-window', {notePath});
ipcRenderer.send('create-extra-window', {notePath, hoistedNoteId});
}
else {
const url = window.location.protocol + '//' + window.location.host + window.location.pathname + '?extra=1#' + notePath;
@@ -198,7 +202,7 @@ export default class Entrypoints extends Component {
}
async openNewWindowCommand() {
this.openInWindowCommand({notePath: ''});
this.openInWindowCommand({notePath: '', hoistedNoteId: 'root'});
}
async runActiveNoteCommand() {