tab row is detecting workspace changes

This commit is contained in:
zadam
2021-02-07 20:55:49 +01:00
parent 2a67d9eae2
commit cd5be59413
4 changed files with 16 additions and 5 deletions

View File

@@ -515,7 +515,9 @@ export default class NoteTreeWidget extends TabAwareWidget {
$span.find('.tree-item-button').remove();
if (activeTabContext && activeTabContext.hoistedNoteId === note.noteId && note.noteId !== 'root') {
const isHoistedNote = activeTabContext && activeTabContext.hoistedNoteId === note.noteId && note.noteId !== 'root';
if (isHoistedNote) {
const $unhoistButton = $('<span class="tree-item-button unhoist-button bx bx-door-open" title="Unhoist"></span>');
$unhoistButton.on('click', () => alert("bebe"));
@@ -523,7 +525,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
$span.append($unhoistButton);
}
if (note.hasLabel('workspace')) {
if (note.hasLabel('workspace') && !isHoistedNote) {
const $enterWorkspaceButton = $('<span class="tree-item-button enter-workspace-button bx bx-door-open" title="Hoist this note (workspace)"></span>');
$span.append($enterWorkspaceButton);