Simplify setting lastOpened serialized value

Iterate over the project's edit sessions instead of
the stored paths in the serialized state.
This commit is contained in:
Kevin Sawicki
2013-02-13 13:09:09 -08:00
parent 67b2aeaae9
commit 06f0988028

View File

@@ -18,10 +18,8 @@ module.exports =
@loadPathsTask = new LoadPathsTask((paths) => @projectPaths = paths)
@loadPathsTask.start()
for path, lastOpened of state
session = _.detect rootView.project.getEditSessions(), (editSession) ->
editSession.getPath() is path
session?.lastOpened = lastOpened
for editSession in rootView.project.getEditSessions()
editSession.lastOpened = state[editSession.getPath()]
deactivate: ->
@loadPathsTask?.terminate()