record event for fetched ota update
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
|||||||
|
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {IS_TESTFLIGHT} from 'lib/app-info'
|
import {IS_TESTFLIGHT} from 'lib/app-info'
|
||||||
|
import {logEvent} from 'lib/statsig/statsig'
|
||||||
import {isIOS} from 'platform/detection'
|
import {isIOS} from 'platform/detection'
|
||||||
|
|
||||||
const MINIMUM_MINIMIZE_TIME = 15 * 60e3
|
const MINIMUM_MINIMIZE_TIME = 15 * 60e3
|
||||||
@@ -49,6 +50,7 @@ export function useOTAUpdates() {
|
|||||||
if (res.isAvailable) {
|
if (res.isAvailable) {
|
||||||
logger.debug('Attempting to fetch update...')
|
logger.debug('Attempting to fetch update...')
|
||||||
await fetchUpdateAsync()
|
await fetchUpdateAsync()
|
||||||
|
logEvent('update:fetched', {'update-id': res.manifest.id})
|
||||||
} else {
|
} else {
|
||||||
logger.debug('No update available.')
|
logger.debug('No update available.')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ export type LogEvents = {
|
|||||||
init: {
|
init: {
|
||||||
initMs: number
|
initMs: number
|
||||||
}
|
}
|
||||||
|
'update:fetched': {
|
||||||
|
'update-id': string
|
||||||
|
}
|
||||||
'account:loggedIn': {
|
'account:loggedIn': {
|
||||||
logContext:
|
logContext:
|
||||||
| 'LoginForm'
|
| 'LoginForm'
|
||||||
|
|||||||
Reference in New Issue
Block a user