Refactor config, move ipc calls to app module, some cleanup (#2669)

This commit is contained in:
Devin Binnie
2023-04-06 11:24:57 -04:00
committed by GitHub
parent 88eb2e2c70
commit 741087cb55
29 changed files with 551 additions and 638 deletions

View File

@@ -47,8 +47,8 @@ export function openDeepLink(deeplinkingUrl: string) {
}
export function updateSpellCheckerLocales() {
if (Config.data?.spellCheckerLocales.length && app.isReady()) {
session.defaultSession.setSpellCheckerLanguages(Config.data?.spellCheckerLocales);
if (Config.spellCheckerLocales.length && app.isReady()) {
session.defaultSession.setSpellCheckerLanguages(Config.spellCheckerLocales);
}
}
@@ -67,7 +67,7 @@ export function updateServerInfos(teams: TeamWithTabs[]) {
hasUpdates = hasUpdates || openExtraTabs(data, team);
});
if (hasUpdates) {
Config.set('teams', teams);
Config.setServers(teams);
}
}).catch((reason: any) => {
log.error('Error getting server infos', reason);