mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
fix(analytics): delay closing of onboarding window
This commit is contained in:
parent
0f9475cc91
commit
280015b5c0
2 changed files with 9 additions and 1 deletions
|
@ -32,7 +32,14 @@ class PageRouterStore extends NylasStore
|
|||
@_onMoveToPage('initial-preferences', {account: json})
|
||||
Actions.recordUserEvent('First Account Linked')
|
||||
else
|
||||
ipcRenderer.send('account-setup-successful')
|
||||
# When account JSON is received, we want to notify external services
|
||||
# that it succeeded. Unfortunately in this case we're likely to
|
||||
# close the window before those requests can be made. We add a short
|
||||
# delay here to ensure that any pending requests have a chance to
|
||||
# clear before the window closes.
|
||||
setTimeout ->
|
||||
ipcRenderer.send('account-setup-successful')
|
||||
, 100
|
||||
|
||||
_onWindowPropsChanged: ({page, pageData}={}) =>
|
||||
@_onMoveToPage(page, pageData)
|
||||
|
|
|
@ -42,6 +42,7 @@ class SearchSuggestionStore extends NylasStore
|
|||
current = FocusedPerspectiveStore.current()
|
||||
|
||||
if @queryPopulated()
|
||||
Actions.recordUserEvent("Commit Search Query", {})
|
||||
@_perspectiveBeforeSearch ?= current
|
||||
next = MailboxPerspective.forSearch(current.accountIds, @_searchQuery.trim())
|
||||
Actions.focusMailboxPerspective(next)
|
||||
|
|
Loading…
Reference in a new issue