diff --git a/app/src/UpdateNotifier.tsx b/app/src/UpdateNotifier.tsx index 7633865..18d78cf 100644 --- a/app/src/UpdateNotifier.tsx +++ b/app/src/UpdateNotifier.tsx @@ -158,7 +158,6 @@ class UpdateNotifier extends React.Component { } private renderDownloads(updateInfo: UpdateInfo) { - console.log(updateInfo) return updateInfo.files .map((file: UpdateFileInfo, index: number) => (
diff --git a/app/src/components/Tree/TreeNode.tsx b/app/src/components/Tree/TreeNode.tsx index 4d28a20..ee016f3 100644 --- a/app/src/components/Tree/TreeNode.tsx +++ b/app/src/components/Tree/TreeNode.tsx @@ -90,31 +90,18 @@ class TreeNode extends React.Component { } } - private writeStats(what: string) { - const w: any = window - if (!w.stats) { - w.stats = {} - } - if (!w.stats[what]) { - w.stats[what] = 0 - } - w.stats[what] += 1 - } - public componentDidMount() { const { treeNode } = this.props this.addSubscriber(treeNode) } private addSubscriber(treeNode: q.TreeNode) { - this.writeStats('subscribe') treeNode.onMerge.subscribe(this.subnodesDidchange) treeNode.onEdgesChange.subscribe(this.edgesDidChange) treeNode.onMessage.subscribe(this.messageDidChange) } private removeSubscriber(treeNode: q.TreeNode) { - this.writeStats('unsubscribe') treeNode.onMerge.unsubscribe(this.subnodesDidchange) treeNode.onEdgesChange.unsubscribe(this.edgesDidChange) treeNode.onMessage.unsubscribe(this.messageDidChange) @@ -128,12 +115,8 @@ class TreeNode extends React.Component { } public componentWillUnmount() { - this.writeStats('unsubscribe') - const { treeNode } = this.props - treeNode.onMerge.unsubscribe(this.subnodesDidchange) - treeNode.onEdgesChange.unsubscribe(this.edgesDidChange) - treeNode.onMessage.unsubscribe(this.messageDidChange) + this.removeSubscriber(treeNode) this.topicSelectRef = undefined this.titleRef = undefined } diff --git a/backend/src/Model/Tree.ts b/backend/src/Model/Tree.ts index e123df5..8788933 100644 --- a/backend/src/Model/Tree.ts +++ b/backend/src/Model/Tree.ts @@ -1,4 +1,4 @@ -import { Edge, TreeNode } from './' +import { TreeNode } from './' import { EventBusInterface, makeConnectionMessageEvent, MqttMessage } from '../../../events' import { TreeNodeFactory } from './TreeNodeFactory' @@ -40,7 +40,6 @@ export class Tree extends TreeNode { public stopUpdating() { if (this.subscriptionEvent && this.updateSource) { - console.log(this.updateSource.ipc) this.updateSource.unsubscribe(this.subscriptionEvent, this.handleNewData) } } diff --git a/events/EventBus.ts b/events/EventBus.ts index f2a31f3..421303f 100644 --- a/events/EventBus.ts +++ b/events/EventBus.ts @@ -70,7 +70,6 @@ class IpcRendererEventBus implements EventBusInterface { } public unsubscribe(event: Event, callback: any) { - debugger const item = this.callbacks.find(store => store.callback === callback) if (!item) { return