From 24c6b7e7b3124269504ef9dd551b16fa3815485e Mon Sep 17 00:00:00 2001 From: Thomas Nordquist Date: Mon, 18 Feb 2019 16:36:53 +0100 Subject: [PATCH] Clean up --- events/EventBus.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/events/EventBus.ts b/events/EventBus.ts index a86d3ff..ec5dafc 100644 --- a/events/EventBus.ts +++ b/events/EventBus.ts @@ -24,13 +24,13 @@ class IpcMainEventBus implements EventBusInterface { public subscribe(subscribeEvent: Event, callback:(msg: MessageType) => void) { console.log('subscribing', subscribeEvent.topic) this.ipc.on(subscribeEvent.topic, (event: any, arg: any) => { - console.log(subscribeEvent.topic, arg) this.client = event.sender callback(arg) }) } public unsubscribeAll(event: Event) { + console.log('unsubscribeAll', event.topic) this.ipc.removeAllListeners(event.topic) } @@ -40,8 +40,6 @@ class IpcMainEventBus implements EventBusInterface { public emit(event: Event, msg: MessageType) { if (!this.client.isDestroyed()) { - console.log(event.topic, msg) - this.client.send(event.topic, msg) } } @@ -83,7 +81,6 @@ class IpcRendererEventBus implements EventBusInterface { } public emit(event: Event, msg: MessageType) { - console.log(event.topic, msg) this.ipc.send(event.topic, msg) } }