mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
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:
@@ -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 ->
|
||||
|
||||
Reference in New Issue
Block a user