mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2026-11-27 06:32:42 +00:00
fix workspace freeze on load
This commit is contained in:
1 parent
ff5780b703
commit
e25083504b
1 file changed
+9
-2
@@ -170,7 +170,11 @@ export class ExcalidrawSidepanelView extends ItemView {
|
||||
});
|
||||
this.resolveReady?.();
|
||||
this.resolveReady = null;
|
||||
await this.restorePersistedTabs();
|
||||
if(this.app.workspace.layoutReady) {
|
||||
await this.restorePersistedTabs();
|
||||
} else {
|
||||
this.restorePersistedTabs();
|
||||
};
|
||||
this.updateEmptyStateVisibility();
|
||||
}
|
||||
|
||||
@@ -332,7 +336,10 @@ export class ExcalidrawSidepanelView extends ItemView {
|
||||
const tab = new ExcalidrawSidepanelTab(
|
||||
title,
|
||||
{
|
||||
activate: (target) => this.setActiveTab(target),
|
||||
activate: (target) => {
|
||||
this.setActiveTab(target);
|
||||
this.reveal();
|
||||
},
|
||||
close: (target) => this.removeTab(target),
|
||||
updateTitle: (target) => this.updateTabOptionTitle(target),
|
||||
plugin: this.plugin,
|
||||
|
||||
Reference in new issue
Block a user