mirror of
https://github.com/atom/atom.git
synced 2026-02-18 02:21:43 -05:00
Parameterize configDirPath and move config.load in ctor
This commit is contained in:
@@ -105,8 +105,7 @@ class AtomEnvironment extends Model
|
||||
@state = {version: @constructor.version}
|
||||
|
||||
@loadTime = null
|
||||
{devMode, safeMode, resourcePath} = @getLoadSettings()
|
||||
configDirPath = @getConfigDirPath()
|
||||
{devMode, safeMode, resourcePath, configDirPath} = @getLoadSettings()
|
||||
|
||||
@emitter = new Emitter
|
||||
@disposables = new CompositeDisposable
|
||||
@@ -179,6 +178,16 @@ class AtomEnvironment extends Model
|
||||
})
|
||||
@themes.workspace = @workspace
|
||||
|
||||
@config.load()
|
||||
|
||||
@themes.loadBaseStylesheets()
|
||||
@initialStyleElements = @styles.getSnapshot()
|
||||
@themes.initialLoadComplete = true
|
||||
@setBodyPlatformClass()
|
||||
|
||||
@stylesElement = @styles.buildStylesElement()
|
||||
@document.head.appendChild(@stylesElement)
|
||||
|
||||
@keymaps.subscribeToFileReadFailure()
|
||||
@keymaps.loadBundledKeymaps()
|
||||
|
||||
@@ -260,7 +269,7 @@ class AtomEnvironment extends Model
|
||||
|
||||
@grammars.clear()
|
||||
|
||||
@styles.restoreSnapshot(params?.stylesSnapshot ? [])
|
||||
@styles.restoreSnapshot(@initialStyleElements)
|
||||
|
||||
@menu.clear()
|
||||
|
||||
@@ -295,6 +304,7 @@ class AtomEnvironment extends Model
|
||||
@project?.destroy()
|
||||
@project = null
|
||||
@commands.clear()
|
||||
@stylesElement.remove()
|
||||
|
||||
@uninstallWindowEventHandler()
|
||||
|
||||
@@ -598,12 +608,6 @@ class AtomEnvironment extends Model
|
||||
@disposables.add(@applicationDelegate.onContextMenuCommand(@dispatchContextMenuCommand.bind(this)))
|
||||
@listenForUpdates()
|
||||
|
||||
@config.load()
|
||||
@themes.loadBaseStylesheets()
|
||||
@setBodyPlatformClass()
|
||||
|
||||
@document.head.appendChild(@styles.buildStylesElement())
|
||||
|
||||
@packages.loadPackages()
|
||||
|
||||
@document.body.appendChild(@views.getView(@workspace))
|
||||
|
||||
Reference in New Issue
Block a user