mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
Pass saveState options to project.serialize
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user