Skip to content

Commit

Permalink
main: Display Sidebar(If Disabled) for single Org users \n\n Fixes zu…
Browse files Browse the repository at this point in the history
…lip#1077

Signed-off-by: tarun8718 <tarunkumar8718@gmail.com>
  • Loading branch information
tarun8718 committed Apr 3, 2021
1 parent 3b2256b commit 83a74e4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/renderer/js/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down

0 comments on commit 83a74e4

Please sign in to comment.