From 55dea3037b06d829269f5b1ca27dc9b7a6a11eb0 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 8 Jul 2016 17:32:56 -0700 Subject: [PATCH] hyperterm: cleanup --- app/hyperterm.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/hyperterm.js b/app/hyperterm.js index 0b645d6d..441e1cca 100644 --- a/app/hyperterm.js +++ b/app/hyperterm.js @@ -61,7 +61,6 @@ export default class HyperTerm extends Component { this.onUpdateAvailable = this.onUpdateAvailable.bind(this); document.body.style.backgroundColor = props.config.backgroundColor; - this.rpc = new RPC(); } componentWillReceiveProps (props) { @@ -145,10 +144,6 @@ export default class HyperTerm extends Component { this.rpc.emit('quit and install'); } - closeUpdateIndicator () { - // @TODO - } - openExternal (ev) { ev.preventDefault(); this.rpc.emit('open external', { url: ev.target.href }); @@ -156,7 +151,10 @@ export default class HyperTerm extends Component { requestTab () { // we send the hterm default size - this.rpc.emit('new', { cols: this.state.cols, rows: this.state.rows }); + this.rpc.emit('new', { + cols: this.state.cols, + rows: this.state.rows + }); } closeActiveTab () { @@ -237,6 +235,8 @@ export default class HyperTerm extends Component { } componentDidMount () { + this.rpc = new RPC(); + // open a new tab upon mounting this.rpc.once('ready', () => this.requestTab());