Send beta user state with AppView requests (#11474)

This commit is contained in:
DS Boyce
2026-08-18 09:50:15 -07:00
committed by GitHub
parent 45aa1a67b0
commit cc3622b583
7 changed files with 159 additions and 22 deletions
@@ -5,6 +5,7 @@ import {type NativeStackScreenProps} from '@react-navigation/native-stack'
import {type CommonNavigatorParams} from '#/lib/routes/types'
import {logger} from '#/logger'
import {setCachedIsBetaUser} from '#/state/preferences/beta-user-cache'
import {
usePreferencesQuery,
useSetIsBetaUserMutation,
@@ -25,7 +26,6 @@ import {Text} from '#/components/Typography'
import {features, useAnalytics} from '#/analytics'
import {getTargetedFeatures} from '#/analytics/features'
import {IS_WEB} from '#/env'
import {account} from '#/storage'
type Props = NativeStackScreenProps<
CommonNavigatorParams,
@@ -74,7 +74,7 @@ export function BetaFeaturesSettingsScreen({}: Props) {
* account-specific.
*/
if (currentAccount) {
account.set([currentAccount.did, 'isBetaUser'], next)
setCachedIsBetaUser(currentAccount.did, next)
}
ax.metric('betaFeatures:toggle', {
enabled: next,