recording timer, bux fixes, simplified emitter

This commit is contained in:
Andrew Gundersen 2021-11-22 15:59:33 -06:00
commit 7de0555856
5 changed files with 30 additions and 16 deletions

View file

@ -52,7 +52,6 @@ function createWin()
.on("closed", () => {
store.set("focus", false);
backgroundMitt.removeAllListeners("ipc-renderer");
win = null;
})
@ -63,9 +62,10 @@ function createWin()
win.webContents.on("did-finish-load", () => {
/* Gateway to the frontend */
backgroundMitt.on("ipc-renderer", (e) => {
win.webContents.send(e.channel, e.payload);
backgroundMitt.removeAllListeners("ipc-renderer");
backgroundMitt.on("ipc-renderer", (channel, ...args) => {
win.webContents.send(channel, ...args);
});
win.webContents.send("set-account", store.get("account"));