[MM-44339] Remove unnecessary calls to show the main window (#2134)

This commit is contained in:
Devin Binnie
2022-05-27 09:27:51 -04:00
committed by GitHub
parent 37fe523e8c
commit 8979c18226
2 changed files with 0 additions and 5 deletions

View File

@@ -124,10 +124,6 @@ function createMainWindow(options: {linuxAppIcon: string; fullscreen?: boolean})
} }
}); });
mainWindow.once('show', () => {
mainWindow.show();
});
mainWindow.once('restore', () => { mainWindow.once('restore', () => {
mainWindow.restore(); mainWindow.restore();
}); });

View File

@@ -213,7 +213,6 @@ export class WindowManager {
// max retries allows the message to get to the renderer even if it is sent while the app is starting up. // max retries allows the message to get to the renderer even if it is sent while the app is starting up.
sendToRendererWithRetry = (maxRetries: number, channel: string, ...args: any[]) => { sendToRendererWithRetry = (maxRetries: number, channel: string, ...args: any[]) => {
if (!this.mainWindow || !this.mainWindowReady) { if (!this.mainWindow || !this.mainWindowReady) {
this.showMainWindow();
if (maxRetries > 0) { if (maxRetries > 0) {
log.info(`Can't send ${channel}, will retry`); log.info(`Can't send ${channel}, will retry`);
setTimeout(() => { setTimeout(() => {