mirror of
https://github.com/atom/atom.git
synced 2026-02-04 11:45:16 -05:00
Show number of paths loaded after indexing message
This commit is contained in:
@@ -148,7 +148,8 @@ class FuzzyFinderView extends SelectList
|
||||
@setArray(listedItems)
|
||||
options.done(listedItems) if options.done?
|
||||
else
|
||||
@setLoading("Indexing...")
|
||||
@setLoading("Indexing project...")
|
||||
@loadingBadge.text("")
|
||||
|
||||
if @reloadProjectPaths
|
||||
@loadPathsTask?.abort()
|
||||
@@ -157,6 +158,8 @@ class FuzzyFinderView extends SelectList
|
||||
@reloadProjectPaths = false
|
||||
@populateProjectPaths(options)
|
||||
@loadPathsTask = new LoadPathsTask(callback)
|
||||
@loadPathsTask.on 'paths-loaded', (paths) =>
|
||||
@loadingBadge.text(paths.length)
|
||||
@loadPathsTask.start()
|
||||
|
||||
populateOpenBufferPaths: ->
|
||||
|
||||
@@ -14,6 +14,7 @@ class LoadPathsTask extends Task
|
||||
|
||||
pathsLoaded: (paths) ->
|
||||
@paths.push(paths...)
|
||||
@trigger 'paths-loaded', @paths
|
||||
|
||||
pathLoadingComplete: ->
|
||||
@callback(@paths)
|
||||
|
||||
@@ -46,7 +46,7 @@ describe 'FuzzyFinder', ->
|
||||
rootView.trigger 'fuzzy-finder:toggle-file-finder'
|
||||
paths = null
|
||||
expect(finderView.find(".loading")).toBeVisible()
|
||||
expect(finderView.find(".loading")).toHaveText "Indexing..."
|
||||
expect(finderView.find(".loading").text().length).toBeGreaterThan 0
|
||||
|
||||
waitsFor "all project paths to load", 5000, ->
|
||||
unless finderView.reloadProjectPaths
|
||||
|
||||
Reference in New Issue
Block a user