mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-12 16:04:35 +08:00
fix(analytics): delay closing of onboarding window
This commit is contained in:
parent
ac52589de5
commit
5f1b8633c7
2 changed files with 9 additions and 1 deletions
|
@ -32,7 +32,14 @@ class PageRouterStore extends NylasStore
|
||||||
@_onMoveToPage('initial-preferences', {account: json})
|
@_onMoveToPage('initial-preferences', {account: json})
|
||||||
Actions.recordUserEvent('First Account Linked')
|
Actions.recordUserEvent('First Account Linked')
|
||||||
else
|
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}={}) =>
|
_onWindowPropsChanged: ({page, pageData}={}) =>
|
||||||
@_onMoveToPage(page, pageData)
|
@_onMoveToPage(page, pageData)
|
||||||
|
|
|
@ -42,6 +42,7 @@ class SearchSuggestionStore extends NylasStore
|
||||||
current = FocusedPerspectiveStore.current()
|
current = FocusedPerspectiveStore.current()
|
||||||
|
|
||||||
if @queryPopulated()
|
if @queryPopulated()
|
||||||
|
Actions.recordUserEvent("Commit Search Query", {})
|
||||||
@_perspectiveBeforeSearch ?= current
|
@_perspectiveBeforeSearch ?= current
|
||||||
next = MailboxPerspective.forSearch(current.accountIds, @_searchQuery.trim())
|
next = MailboxPerspective.forSearch(current.accountIds, @_searchQuery.trim())
|
||||||
Actions.focusMailboxPerspective(next)
|
Actions.focusMailboxPerspective(next)
|
||||||
|
|
Loading…
Reference in a new issue