Pass saveState options to project.serialize

This commit is contained in:
Antonio Scandurra
2016-03-04 17:11:34 +01:00
parent 0fdc190989
commit 3bdb83f97e

View File

@@ -670,9 +670,9 @@ class AtomEnvironment extends Model
@openInitialEmptyEditorIfNecessary()
serialize: ->
serialize: (options) ->
version: @constructor.version
project: @project.serialize()
project: @project.serialize(options)
workspace: @workspace.serialize()
packageStates: @packages.serialize()
grammars: {grammarOverridesByPath: @grammars.grammarOverridesByPath}
@@ -817,9 +817,12 @@ class AtomEnvironment extends Model
@blobStore.save()
saveState: ->
saveState: (options) ->
return Promise.resolve() unless @enablePersistence
options ?= {}
options.isQuitting ?= false
new Promise (resolve, reject) =>
window.requestIdleCallback =>
state = @serialize()