mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-10 21:28:08 +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) {
|
if (newAccountIds.length > 0) {
|
||||||
const newId = newAccountIds[0]
|
const newId = newAccountIds[0]
|
||||||
const NylasSyncStatusStore = require('./nylas-sync-status-store').default
|
// const NylasSyncStatusStore = require('./nylas-sync-status-store').default
|
||||||
NylasSyncStatusStore.whenCategoryListSynced(newId).then(() => {
|
|
||||||
Actions.focusDefaultMailboxPerspectiveForAccounts([newId], {sidebarAccountIds: accountIds})
|
Actions.focusDefaultMailboxPerspectiveForAccounts([newId], {sidebarAccountIds: accountIds})
|
||||||
// TODO: This Action is a hack, get rid of it in sidebar refactor
|
// 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
|
// Wait until the FocusedPerspectiveStore triggers and the sidebar is
|
||||||
// updated to uncollapse the inbox for the new account
|
// updated to uncollapse the inbox for the new account
|
||||||
_.defer(() => {
|
setTimeout(() => {
|
||||||
Actions.setCollapsedSidebarItem('Inbox', false)
|
Actions.setCollapsedSidebarItem('Inbox', false)
|
||||||
})
|
}, 100)
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue