Override the RELOAD_REQUESTED_SIGNAL correctly (#880)

This commit is contained in:
Mark Sujew 2022-03-03 15:37:37 +01:00 committed by GitHub
parent 93a374d0c6
commit e6b9d4e2aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,7 @@ import { URI } from '@theia/core/shared/vscode-uri';
import * as electronRemoteMain from '@theia/core/electron-shared/@electron/remote/main';
import { Deferred } from '@theia/core/lib/common/promise-util';
import * as os from '@theia/core/lib/common/os';
import { RELOAD_REQUESTED_SIGNAL, Restart } from '@theia/core/lib/electron-common/messaging/electron-messages';
app.commandLine.appendSwitch('disable-http-cache');
@ -157,7 +158,9 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
app.on('second-instance', this.onSecondInstance.bind(this));
app.on('window-all-closed', this.onWindowAllClosed.bind(this));
ipcMain.on('restart', ({ sender }) => {
ipcMain.on(RELOAD_REQUESTED_SIGNAL, event => this.handleReload(event));
ipcMain.on(Restart, ({ sender }) => {
this.restart(sender.id);
});
}