mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
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.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user