mirror of
https://github.com/atom/atom.git
synced 2026-02-06 20:55:33 -05:00
Don't store package state in command-panel package
The package loader now only calls serialize if activate has been called and reuses the previous state if the package is never activated.
This commit is contained in:
@@ -3,15 +3,12 @@ CommandPanelView = require './command-panel-view'
|
||||
module.exports =
|
||||
commandPanelView: null
|
||||
|
||||
activate: (@state) ->
|
||||
@commandPanelView = new CommandPanelView(@state)
|
||||
activate: (state) ->
|
||||
@commandPanelView = new CommandPanelView(state)
|
||||
|
||||
deactivate: ->
|
||||
@commandPanelView?.destroy()
|
||||
@commandPanelView = null
|
||||
|
||||
serialize: ->
|
||||
if @commandPanelView?
|
||||
@commandPanelView.serialize()
|
||||
else
|
||||
@state
|
||||
@commandPanelView.serialize()
|
||||
|
||||
Reference in New Issue
Block a user