I am working on migrating an existing package from using a panel to the Dock API. I can toggle showing the custom Dock item per the flight manual tutorial. I am now trying to figure out how to serialize the package state so that if the Dock item is visible, it is reloaded when atom is reopened.
I can test to see if the Dock item is present using
atom.workspace.getPaneItems(), and serializing a boolean in the package state if an item that is an instance of my custom item is present. However, if the item’s visibility is toggled, or the “arrow” is used to hide the dock, the item still exists. Is there a recommended way to determine if a Dock item is both present and visible? Is there a more typical way to let Atom itself serialize the state of the entire workspace with my custom item?