Skip to content

Commit

Permalink
optimize memory
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi-arya1 committed Dec 30, 2023
1 parent 9ce2954 commit 8c72058
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AppUpdater {
}

let mainWindow: BrowserWindow | null = null;
let splash: BrowserWindow | null = null;
// let splash: BrowserWindow | null = null;

ipcMain.on('ipc-example', async (event, arg) => {
const msgTemplate = (pingPong: string) => `IPC test: ${pingPong}`;
Expand Down Expand Up @@ -70,20 +70,20 @@ const createWindow = async () => {
return path.join(RESOURCES_PATH, ...paths);
};

splash = new BrowserWindow({
width: 500,
height: 300,
transparent: true,
frame: false,
alwaysOnTop: true,
webPreferences: {
devTools: false,
},
});

splash.loadFile('../components/splashscreen/splash.html');
splash.center();
splash.show();
// splash = new BrowserWindow({
// width: 500,
// height: 300,
// transparent: true,
// frame: false,
// alwaysOnTop: true,
// webPreferences: {
// devTools: false,
// },
// });

// splash.loadFile('../components/splashscreen/splash.html');
// splash.center();
// splash.show();

mainWindow = new BrowserWindow({
show: false,
Expand All @@ -107,6 +107,7 @@ const createWindow = async () => {
if (process.env.START_MINIMIZED) {
mainWindow.minimize();
} else {
// splash?.close();
mainWindow.show();
}
});
Expand Down

0 comments on commit 8c72058

Please sign in to comment.