diff --git a/CHANGELOG.md b/CHANGELOG.md index bc298923..1abf7f44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). [Unpublished] ------------------- ### Fixed -- [[`#478`][]] Occasional breakage when opening TreeView on Arch Linux +- [[`#478`][]] Occasional breakage opening `tree-view` on Arch Linux +- Icons reverted when changing certain `tree-view` settings [`#478`]: https://github.com/DanBrooker/file-icons/issues/478 diff --git a/lib/consumers/tree-view.js b/lib/consumers/tree-view.js index cb18ae59..a4ca11ea 100644 --- a/lib/consumers/tree-view.js +++ b/lib/consumers/tree-view.js @@ -45,9 +45,14 @@ class TreeView{ }); this.disposables.add(onMove); } - const onAddPath = atom.project.onDidChangePaths(_=> this.updateRoots()); - this.disposables.add(onAddPath); - this.updateRoots(); + this.disposables.add( + atom.project.onDidChangePaths(_=> this.rebuild()), + atom.config.onDidChange("tree-view.hideIgnoredNames", _=> this.rebuild()), + atom.config.onDidChange("tree-view.hideVcsIgnoredFiles", _=> this.rebuild()), + atom.config.onDidChange("tree-view.squashDirectoryNames", _=> this.rebuild()), + atom.config.onDidChange("tree-view.sortFoldersBeforeFiles", _=> this.rebuild()) + ); + this.rebuild(); }) ); } @@ -116,7 +121,7 @@ class TreeView{ - updateRoots(){ + rebuild(){ for(const root of this.element.roots) this.track(root.directory); }