From ae96a48572a5ad84777cb79370e70cf5df17752a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 Mar 2013 11:59:36 -0700 Subject: [PATCH] Call populateProjectPaths when callback completes This removes duplicate code for the cases when a callback is used and when the view already has populated paths. --- src/packages/fuzzy-finder/lib/fuzzy-finder-view.coffee | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/packages/fuzzy-finder/lib/fuzzy-finder-view.coffee b/src/packages/fuzzy-finder/lib/fuzzy-finder-view.coffee index 3161115d8..bad52beaf 100644 --- a/src/packages/fuzzy-finder/lib/fuzzy-finder-view.coffee +++ b/src/packages/fuzzy-finder/lib/fuzzy-finder-view.coffee @@ -157,15 +157,7 @@ class FuzzyFinderView extends SelectList callback = (paths) => @projectPaths = paths @reloadProjectPaths = false - listedItems = - if options.filter? - @projectPaths.filter (path) -> - path.indexOf(options.filter) >= 0 - else - @projectPaths - - @setArray(listedItems) - options.done(listedItems) if options.done? + @populateProjectPaths(options) @loadPathsTask = new LoadPathsTask(callback) @loadPathsTask.start()