Add back serializiation of last opened time

This commit is contained in:
Kevin Sawicki
2013-04-02 09:04:42 -07:00
parent 7f8978f07a
commit 2e0a6af8ca
2 changed files with 7 additions and 1 deletions

View File

@@ -31,7 +31,12 @@ module.exports =
@projectPaths = null
serialize: ->
@fuzzyFinderView?.getOpenedPaths()
if @fuzzyFinderView?
paths = {}
for editSession in project.getEditSessions()
path = editSession.getPath()
paths[path] = editSession.lastOpened if path?
paths
createView: ->
unless @fuzzyFinderView

View File

@@ -145,6 +145,7 @@ describe 'FuzzyFinder', ->
atom.deactivatePackage('fuzzy-finder')
states = _.map atom.getPackageState('fuzzy-finder'), (path, time) -> [ path, time ]
expect(states.length).toBe 3
states = _.sortBy states, (path, time) -> -time
paths = [ 'sample-with-tabs.coffee', 'sample.txt', 'sample.js' ]