Reduce the number of writes to the config (#2498)

* Add some logging, refactor setting config items

* Move active team to setMultiple, reduce serverInfos calls if the data is already the same

* Fix some logging

* Lint fix
This commit is contained in:
Devin Binnie
2023-01-12 08:46:06 -05:00
committed by GitHub
parent 9f6893fdb2
commit db76a67fb5
7 changed files with 62 additions and 30 deletions

View File

@@ -590,6 +590,7 @@ export class WindowManager {
}
switchServer = (serverName: string, waitForViewToExist = false) => {
log.debug('windowManager.switchServer');
this.showMainWindow();
const server = Config.teams.find((team) => team.name === serverName);
if (!server) {
@@ -617,6 +618,7 @@ export class WindowManager {
}
switchTab = (serverName: string, tabName: string) => {
log.debug('windowManager.switchTab');
this.showMainWindow();
const tabViewName = getTabViewName(serverName, tabName);
this.viewManager?.showByName(tabViewName);