mirror of
https://github.com/atom/atom.git
synced 2026-02-14 08:35:11 -05:00
Make RootView listen for events before loading packages
This is because RootView listens to some of its own events. It needs to be first in line to handle its own events because package event handlers might rely on tree view's event handlers having been run. This also brings behavior more in line with what we'll experience in specs.
This commit is contained in:
@@ -41,6 +41,7 @@ class RootView extends View
|
||||
window.rootView = this
|
||||
@packageStates ?= {}
|
||||
@packageModules = {}
|
||||
@handleEvents()
|
||||
|
||||
if not projectOrPathToOpen or _.isString(projectOrPathToOpen)
|
||||
pathToOpen = projectOrPathToOpen
|
||||
@@ -50,8 +51,6 @@ class RootView extends View
|
||||
|
||||
config.load()
|
||||
|
||||
@handleEvents()
|
||||
|
||||
if pathToOpen
|
||||
@open(pathToOpen) if fs.isFile(pathToOpen) and not suppressOpen
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user