diff --git a/app/renderer/js/main.ts b/app/renderer/js/main.ts index 966b2c323..fec4f2864 100644 --- a/app/renderer/js/main.ts +++ b/app/renderer/js/main.ts @@ -977,6 +977,23 @@ class ServerManagerView { }); ipcRenderer.on("open-settings", async () => { + let numberServers = 0; + for (const tab of this.tabs) { + if (tab.props.role === "server") { + numberServers++; + } + } + + if (numberServers === 1) { + const value = ConfigUtil.getConfigItem("showSidebar"); + if (!value) { + const newValue = !value; + this.toggleSidebar(newValue); + this.updateGeneralSettings("toggle-sidebar-setting", newValue); + ConfigUtil.setConfigItem("showSidebar", newValue); + } + } + await this.openSettings(); });