From 8bb6b1daecf2d0b874638a1d0dcd0dd48deb79fd Mon Sep 17 00:00:00 2001 From: SrGooglo Date: Mon, 25 Mar 2024 09:28:28 +0100 Subject: [PATCH] cleanup --- src/renderer/src/contexts/installations.jsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/renderer/src/contexts/installations.jsx b/src/renderer/src/contexts/installations.jsx index ec59517..4e8ae1a 100644 --- a/src/renderer/src/contexts/installations.jsx +++ b/src/renderer/src/contexts/installations.jsx @@ -68,7 +68,7 @@ export class WithContext extends React.Component { const packages = await ipc.exec("pkg:list") for (const event in this.ipcEvents) { - ipc.on(event, this.ipcEvents[event]) + ipc.exclusiveListen(event, this.ipcEvents[event]) } this.setState({ @@ -79,16 +79,6 @@ export class WithContext extends React.Component { }) } - componentWillUnmount() { - for (const event in this.ipcEvents) { - ipc.off(event, this.ipcEvents[event]) - } - } - - install = async (manifest) => { - return await app.invokeInstall(manifest) - } - render() { return