mirror of
https://github.com/jely2002/youtube-dl-gui.git
synced 2021-11-01 22:46:21 +03:00
fix: ipc handler being registered 2 times on app reload
This commit is contained in:
15
main.js
15
main.js
@@ -49,15 +49,16 @@ function startCriticalHandlers(env) {
|
||||
taskList.load();
|
||||
}
|
||||
|
||||
ipcMain.handle("restoreTaskList", () => {
|
||||
taskList.restore()
|
||||
})
|
||||
|
||||
env.errorHandler = new ErrorHandler(win, queryManager, env);
|
||||
|
||||
if(appStarting) {
|
||||
appStarting = false;
|
||||
|
||||
//
|
||||
ipcMain.handle("restoreTaskList", () => {
|
||||
taskList.restore()
|
||||
});
|
||||
|
||||
//Catch all console.log calls, print them to stdout and send them to the renderer devtools.
|
||||
console.log = (arg) => {
|
||||
process.stdout.write(arg + "\n");
|
||||
@@ -154,10 +155,10 @@ function startCriticalHandlers(env) {
|
||||
function createWindow(env) {
|
||||
win = new BrowserWindow({
|
||||
show: false,
|
||||
minWidth: 700,
|
||||
minWidth: 840,
|
||||
minHeight: 650,
|
||||
width: 815,
|
||||
height: 800,
|
||||
width: 860,
|
||||
height: 840,
|
||||
backgroundColor: env.settings.theme === "dark" ? '#212121' : '#ffffff',
|
||||
titleBarStyle: process.platform === "darwin" ? "hiddenInset" : "hidden",
|
||||
frame: false,
|
||||
|
||||
Reference in New Issue
Block a user