Open docks when activating their panes, but not when adding items

This commit is contained in:
Max Brunsfeld
2017-04-04 15:22:32 -07:00
parent 96ddc516f6
commit caafa41f6f
5 changed files with 36 additions and 12 deletions

View File

@@ -48,9 +48,7 @@ module.exports = class Dock {
}
this.subscriptions = new CompositeDisposable(
this.paneContainer.observePanes(pane => {
pane.onDidAddItem(this.handleDidAddPaneItem.bind(this))
}),
this.paneContainer.onDidActivatePane(() => this.activate()),
this.paneContainer.observePanes(pane => {
pane.onDidRemoveItem(this.handleDidRemovePaneItem.bind(this))
})
@@ -201,11 +199,6 @@ module.exports = class Dock {
})
}
handleDidAddPaneItem () {
// Show the dock if you drop an item into it.
this.setState({open: true})
}
handleDidRemovePaneItem () {
// Hide the dock if you remove the last item.
if (this.paneContainer.getPaneItems().length === 0) {