Simplify directory-view's unsubscription from its model

We can just namespace it by the extension name since this the tree view
will only have one directory view for a given directory. There's no need
to disambiguate further.
This commit is contained in:
Nathan Sobo
2013-01-02 05:13:15 -07:00
parent 13d97fb56b
commit 0a051ea224

View File

@@ -63,13 +63,13 @@ class DirectoryView extends View
@isExpanded = false
watchEntries: ->
@directory.on "contents-change.#{@directory.path}", =>
@directory.on "contents-change.tree-view", =>
@buildEntries()
@trigger "tree-view:directory-modified"
unwatchEntries: ->
@unwatchDescendantEntries()
@directory.off ".#{@directory.path}"
@directory.off ".tree-view"
unwatchDescendantEntries: ->
@find('.expanded.directory').each ->