Skip to content

Commit

Permalink
fix #6694 - correctly save downloaded config
Browse files Browse the repository at this point in the history
  • Loading branch information
giejqf authored and Eugeny committed Aug 1, 2022
1 parent 697bbfc commit 04407b3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/lib/app.ts
Expand Up @@ -31,7 +31,7 @@ export class Application {
this.useBuiltinGraphics()
this.ptyManager.init(this)

ipcMain.on('app:save-config', async (event, config) => {
ipcMain.handle('app:save-config', async (event, config) => {
await saveConfig(config)
this.broadcastExcept('host:config-change', event.sender, config)
})
Expand Down
4 changes: 2 additions & 2 deletions tabby-electron/src/services/hostApp.service.ts
Expand Up @@ -58,8 +58,8 @@ export class ElectronHostAppService extends HostAppService {
this.electron.ipcRenderer.send('app:new-window')
}

saveConfig (data: string): void {
this.electron.ipcRenderer.send('app:save-config', data)
async saveConfig (data: string): Promise<void> {
await this.electron.ipcRenderer.invoke('app:save-config', data)
}

emitReady (): void {
Expand Down
2 changes: 1 addition & 1 deletion tabby-electron/src/services/platform.service.ts
Expand Up @@ -109,7 +109,7 @@ export class ElectronPlatformService extends PlatformService {
}

async saveConfig (content: string): Promise<void> {
this.hostApp.saveConfig(content)
await this.hostApp.saveConfig(content)
}

getConfigPath (): string|null {
Expand Down

0 comments on commit 04407b3

Please sign in to comment.