Move analytics out of init (#2115)
* Remove listenSessionLoaded from analytics * Move analytics init call to navigation ready * Remove zod dependency from analytics * Mirror changes on the web * Delete listenSessionLoaded * Only set up listeners once
This commit is contained in:
parent
748212e000
commit
6335be14e1
7 changed files with 35 additions and 48 deletions
|
@ -41,6 +41,7 @@ import {
|
|||
shouldRequestEmailConfirmation,
|
||||
setEmailConfirmationRequested,
|
||||
} from './state/shell/reminders'
|
||||
import {init as initAnalytics} from './lib/analytics/analytics'
|
||||
|
||||
import {HomeScreen} from './view/screens/Home'
|
||||
import {SearchScreen} from './view/screens/Search'
|
||||
|
@ -474,6 +475,8 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) {
|
|||
const {openModal} = useModalControls()
|
||||
|
||||
function onReady() {
|
||||
initAnalytics(currentAccount)
|
||||
|
||||
if (currentAccount && shouldRequestEmailConfirmation(currentAccount)) {
|
||||
openModal({name: 'verify-email', showReminder: true})
|
||||
setEmailConfirmationRequested()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue