mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-23 23:54:13 +08:00
fix(draft-list): Select proper sheet when launching in drafts perspective
This commit is contained in:
parent
1d7efc8614
commit
79b5e34211
1 changed files with 5 additions and 1 deletions
|
@ -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'
|
||||
|
@ -11,6 +11,10 @@ export function activate() {
|
|||
{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})
|
||||
|
|
Loading…
Reference in a new issue