Update prettier

This commit is contained in:
Thomas Nordquist
2020-04-15 23:54:30 +02:00
parent fbfbe94d19
commit 237c718a0a
76 changed files with 130 additions and 257 deletions

View File

@@ -22,12 +22,12 @@ export class IpcRendererEventBus implements EventBusInterface {
this.ipc.removeAllListeners(event.topic)
}
public unsubscribe<MessageType>(event: Event<MessageType>, callback: any) {
const item = this.callbacks.find(store => store.callback === callback)
const item = this.callbacks.find((store) => store.callback === callback)
if (!item) {
return
}
this.ipc.removeListener(event.topic, item.wrappedCallback)
this.callbacks = this.callbacks.filter(a => a !== item)
this.callbacks = this.callbacks.filter((a) => a !== item)
}
public emit<MessageType>(event: Event<MessageType>, msg: MessageType) {
this.ipc.send(event.topic, msg)