mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user