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

@@ -657,7 +657,15 @@ export default class TabRowWidget extends BasicWidget {
async entitiesReloadedEvent({loadResults}) {
for (const tabContext of appContext.tabManager.tabContexts) {
if (loadResults.isNoteReloaded(tabContext.noteId)) {
if (!tabContext.noteId) {
continue;
}
if (loadResults.isNoteReloaded(tabContext.noteId) ||
loadResults.getAttributes().find(attr =>
['workspace', 'workspaceIconClass', 'workspaceTabBackgroundColor'].includes(attr.name)
&& attr.isAffecting(tabContext.note))
) {
const $tab = this.getTabById(tabContext.tabId);
this.updateTab($tab, tabContext.note);