diff options
Diffstat (limited to 'src/screens/Signup/index.tsx')
-rw-r--r-- | src/screens/Signup/index.tsx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/screens/Signup/index.tsx b/src/screens/Signup/index.tsx index 03f4e2cdd..50cc5aa26 100644 --- a/src/screens/Signup/index.tsx +++ b/src/screens/Signup/index.tsx @@ -1,11 +1,14 @@ import {useEffect, useReducer, useState} from 'react' import {AppState, type AppStateStatus, View} from 'react-native' +import ReactNativeDeviceAttest from 'react-native-device-attest' import Animated, {FadeIn, LayoutAnimationConfig} from 'react-native-reanimated' import {AppBskyGraphStarterpack} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {FEEDBACK_FORM_URL} from '#/lib/constants' +import {logger} from '#/logger' +import {isAndroid} from '#/platform/detection' import {useServiceQuery} from '#/state/queries/service' import {useStarterPackQuery} from '#/state/queries/starter-packs' import {useActiveStarterPack} from '#/state/shell/starter-pack' @@ -26,6 +29,7 @@ import {Divider} from '#/components/Divider' import {LinearGradientBackground} from '#/components/LinearGradientBackground' import {InlineLinkText} from '#/components/Link' import {Text} from '#/components/Typography' +import {GCP_PROJECT_ID} from '#/env' import * as bsky from '#/types/bsky' export function Signup({onPressBack}: {onPressBack: () => void}) { @@ -101,6 +105,16 @@ export function Signup({onPressBack}: {onPressBack: () => void}) { return () => subscription.remove() }, []) + // On Android, warmup the Play Integrity API on the signup screen so it is ready by the time we get to the gate screen. + useEffect(() => { + if (!isAndroid) { + return + } + ReactNativeDeviceAttest.warmupIntegrity(GCP_PROJECT_ID).catch(err => + logger.error(err), + ) + }, []) + return ( <SignupContext.Provider value={{state, dispatch}}> <LoggedOutLayout |