mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-03 09:54:54 +08:00
fix(accounts) Make account adding look fast
This commit is contained in:
parent
b1882656ee
commit
aa53484568
1 changed files with 11 additions and 10 deletions
|
@ -46,16 +46,17 @@ class AccountStore extends NylasStore {
|
|||
|
||||
if (newAccountIds.length > 0) {
|
||||
const newId = newAccountIds[0]
|
||||
const NylasSyncStatusStore = require('./nylas-sync-status-store').default
|
||||
NylasSyncStatusStore.whenCategoryListSynced(newId).then(() => {
|
||||
Actions.focusDefaultMailboxPerspectiveForAccounts([newId], {sidebarAccountIds: accountIds})
|
||||
// TODO: This Action is a hack, get rid of it in sidebar refactor
|
||||
// Wait until the FocusedPerspectiveStore triggers and the sidebar is
|
||||
// updated to uncollapse the inbox for the new account
|
||||
_.defer(() => {
|
||||
Actions.setCollapsedSidebarItem('Inbox', false)
|
||||
})
|
||||
})
|
||||
// const NylasSyncStatusStore = require('./nylas-sync-status-store').default
|
||||
Actions.focusDefaultMailboxPerspectiveForAccounts([newId], {sidebarAccountIds: accountIds})
|
||||
// TODO:
|
||||
// Wait for a little bit before uncollapsong the sidebar to show the
|
||||
// newly focused inbox
|
||||
// This Action is a hack, get rid of it in sidebar refactor
|
||||
// Wait until the FocusedPerspectiveStore triggers and the sidebar is
|
||||
// updated to uncollapse the inbox for the new account
|
||||
setTimeout(() => {
|
||||
Actions.setCollapsedSidebarItem('Inbox', false)
|
||||
}, 100)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue