fix(draft-list): Revert regression for sheet selection

This commit is contained in:
Jackie Luo 2016-04-22 17:30:14 -07:00
parent 6a1bed23c1
commit 777ef33622

View file

@ -1,4 +1,4 @@
import {WorkspaceStore, ComponentRegistry} from 'nylas-exports'
import {WorkspaceStore, ComponentRegistry, Actions} from 'nylas-exports'
import DraftList from './draft-list'
import DraftListToolbar from './draft-list-toolbar'
import DraftListSendStatus from './draft-list-send-status'
@ -10,7 +10,11 @@ export function activate() {
'Drafts',
{root: true},
{list: ['RootSidebar', 'DraftList']}
)
);
if (NylasEnv.savedState.perspective &&
NylasEnv.savedState.perspective.type === "DraftsMailboxPerspective") {
Actions.selectRootSheet(WorkspaceStore.Sheet.Drafts);
}
ComponentRegistry.register(DraftList, {location: WorkspaceStore.Location.DraftList})
ComponentRegistry.register(DraftListToolbar, {location: WorkspaceStore.Location.DraftList.Toolbar})