More flag cleanup

This commit is contained in:
Eric Bailey
2026-07-01 10:34:51 -05:00
parent d8c84057ea
commit ff10228fb6
4 changed files with 4 additions and 1 deletions
@@ -71,7 +71,7 @@ export function NoAccessScreen() {
const aa = useAgeAssurance() const aa = useAgeAssurance()
const isBlocked = aa.state.status === aa.Status.Blocked const isBlocked = aa.state.status === aa.Status.Blocked
const isAARegion = !!region const isAARegion = !!region
const hasDeclaredAge = metadata?.declaredAge !== undefined const hasDeclaredAge = aa.flags.hasDeclaredAge
const canUpdateBirthday = const canUpdateBirthday =
isBirthdateUpdateAllowed || isLegacyBirthdateBug(metadata?.birthdate || '') isBirthdateUpdateAllowed || isLegacyBirthdateBug(metadata?.birthdate || '')
+1
View File
@@ -51,6 +51,7 @@ const AgeAssuranceStateContext = createContext<{
adultContentDisabled: false, adultContentDisabled: false,
chatDisabled: false, chatDisabled: false,
groupChatDisabled: false, groupChatDisabled: false,
hasDeclaredAge: false,
isDeclaredUnderAdultAge: false, isDeclaredUnderAdultAge: false,
isOverRegionMinAccessAge: false, isOverRegionMinAccessAge: false,
isOverAppMinAccessAge: false, isOverAppMinAccessAge: false,
+1
View File
@@ -51,6 +51,7 @@ export type AgeAssuranceFlags = {
adultContentDisabled: boolean adultContentDisabled: boolean
chatDisabled: boolean chatDisabled: boolean
groupChatDisabled: boolean groupChatDisabled: boolean
hasDeclaredAge: boolean
isDeclaredUnderAdultAge: boolean isDeclaredUnderAdultAge: boolean
isOverRegionMinAccessAge: boolean isOverRegionMinAccessAge: boolean
isOverAppMinAccessAge: boolean isOverAppMinAccessAge: boolean
+1
View File
@@ -199,6 +199,7 @@ export function computeAgeAssuranceFlags({
adultContentDisabled, adultContentDisabled,
chatDisabled, chatDisabled,
groupChatDisabled, groupChatDisabled,
hasDeclaredAge: metadata?.declaredAge !== undefined,
isDeclaredUnderAdultAge, isDeclaredUnderAdultAge,
isOverRegionMinAccessAge, isOverRegionMinAccessAge,
isOverAppMinAccessAge, isOverAppMinAccessAge,