Add anon ID to version string
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
|
import {useMemo} from 'react'
|
||||||
import {Platform} from 'react-native'
|
import {Platform} from 'react-native'
|
||||||
import {setStringAsync} from 'expo-clipboard'
|
import {setStringAsync} from 'expo-clipboard'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||||
|
import {Statsig} from 'statsig-react-native-expo'
|
||||||
|
|
||||||
import {appVersion, BUNDLE_DATE, bundleInfo} from '#/lib/app-info'
|
import {appVersion, BUNDLE_DATE, bundleInfo} from '#/lib/app-info'
|
||||||
import {STATUS_PAGE_URL} from '#/lib/constants'
|
import {STATUS_PAGE_URL} from '#/lib/constants'
|
||||||
@@ -20,6 +22,7 @@ type Props = NativeStackScreenProps<CommonNavigatorParams, 'AboutSettings'>
|
|||||||
export function AboutSettingsScreen({}: Props) {
|
export function AboutSettingsScreen({}: Props) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const [devModeEnabled, setDevModeEnabled] = useDevModeEnabled()
|
const [devModeEnabled, setDevModeEnabled] = useDevModeEnabled()
|
||||||
|
const stableID = useMemo(() => Statsig.getStableID(), [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout.Screen>
|
<Layout.Screen>
|
||||||
@@ -79,7 +82,7 @@ export function AboutSettingsScreen({}: Props) {
|
|||||||
}}
|
}}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setStringAsync(
|
setStringAsync(
|
||||||
`Build version: ${appVersion}; Bundle info: ${bundleInfo}; Bundle date: ${BUNDLE_DATE}; Platform: ${Platform.OS}; Platform version: ${Platform.Version}`,
|
`Build version: ${appVersion}; Bundle info: ${bundleInfo}; Bundle date: ${BUNDLE_DATE}; Platform: ${Platform.OS}; Platform version: ${Platform.Version}; Anonymous ID: ${stableID}`,
|
||||||
)
|
)
|
||||||
Toast.show(_(msg`Copied build version to clipboard`))
|
Toast.show(_(msg`Copied build version to clipboard`))
|
||||||
}}>
|
}}>
|
||||||
|
|||||||
Reference in New Issue
Block a user