fix social-app ios patch rm create account
This commit is contained in:
@@ -4,119 +4,13 @@ index 6a00cfd23..f91decc08 100644
|
|||||||
+++ b/plugins/notificationsExtension/withNotificationsExtension.js
|
+++ b/plugins/notificationsExtension/withNotificationsExtension.js
|
||||||
@@ -10,7 +10,7 @@ const EXTENSION_NAME = 'BlueskyNSE'
|
@@ -10,7 +10,7 @@ const EXTENSION_NAME = 'BlueskyNSE'
|
||||||
const EXTENSION_CONTROLLER_NAME = 'NotificationService'
|
const EXTENSION_CONTROLLER_NAME = 'NotificationService'
|
||||||
|
|
||||||
const withNotificationsExtension = config => {
|
const withNotificationsExtension = config => {
|
||||||
- const soundFiles = ['dm.aiff']
|
- const soundFiles = ['dm.aiff']
|
||||||
+ const soundFiles = []
|
+ const soundFiles = []
|
||||||
|
|
||||||
return withPlugins(config, [
|
return withPlugins(config, [
|
||||||
// IOS
|
// IOS
|
||||||
diff --git a/src/ageAssurance/util.ts b/src/ageAssurance/util.ts
|
|
||||||
index 104328330..c992a21de 100644
|
|
||||||
--- a/src/ageAssurance/util.ts
|
|
||||||
+++ b/src/ageAssurance/util.ts
|
|
||||||
@@ -2,87 +2,32 @@ import {useMemo} from 'react'
|
|
||||||
import {
|
|
||||||
ageAssuranceRuleIDs as ids,
|
|
||||||
type AppBskyAgeassuranceDefs,
|
|
||||||
- getAgeAssuranceRegionConfig,
|
|
||||||
} from '@atproto/api'
|
|
||||||
-
|
|
||||||
-import {getAge} from '#/lib/strings/time'
|
|
||||||
-import {useAgeAssuranceDataContext} from '#/ageAssurance/data'
|
|
||||||
import {AgeAssuranceAccess} from '#/ageAssurance/types'
|
|
||||||
import {type Geolocation, useGeolocation} from '#/geolocation'
|
|
||||||
+import {useAgeAssuranceDataContext} from '#/ageAssurance/data'
|
|
||||||
|
|
||||||
-const DEFAULT_MIN_AGE = 13
|
|
||||||
-
|
|
||||||
-/**
|
|
||||||
- * Get age assurance region config based on geolocation, with fallback to
|
|
||||||
- * app defaults if no region config is found.
|
|
||||||
- *
|
|
||||||
- * See {@link getAgeAssuranceRegionConfig} for the generic option, which can
|
|
||||||
- * return undefined if the geolocation does not match any AA region.
|
|
||||||
- */
|
|
||||||
export function getAgeAssuranceRegionConfigWithFallback(
|
|
||||||
config: AppBskyAgeassuranceDefs.Config,
|
|
||||||
geolocation: Geolocation,
|
|
||||||
): AppBskyAgeassuranceDefs.ConfigRegion {
|
|
||||||
- const region = getAgeAssuranceRegionConfig(config, {
|
|
||||||
- countryCode: geolocation.countryCode ?? '',
|
|
||||||
- regionCode: geolocation.regionCode,
|
|
||||||
- })
|
|
||||||
-
|
|
||||||
- return (
|
|
||||||
- region || {
|
|
||||||
- countryCode: '*',
|
|
||||||
- regionCode: undefined,
|
|
||||||
- rules: [
|
|
||||||
- {
|
|
||||||
- $type: ids.IfDeclaredOverAge,
|
|
||||||
- age: DEFAULT_MIN_AGE,
|
|
||||||
- access: AgeAssuranceAccess.Full,
|
|
||||||
- },
|
|
||||||
- {
|
|
||||||
- $type: ids.Default,
|
|
||||||
- access: AgeAssuranceAccess.None,
|
|
||||||
- },
|
|
||||||
- ],
|
|
||||||
- }
|
|
||||||
- )
|
|
||||||
+ return {
|
|
||||||
+ countryCode: '*',
|
|
||||||
+ regionCode: undefined,
|
|
||||||
+ rules: [{ $type: ids.Default, access: AgeAssuranceAccess.Full }],
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
-/**
|
|
||||||
- * Hook to get the age assurance region config based on current geolocation.
|
|
||||||
- * Does not fall-back to our app defaults. If no config is found, returns
|
|
||||||
- * undefined, which indicates no regional age assurance rules apply.
|
|
||||||
- */
|
|
||||||
export function useAgeAssuranceRegionConfig() {
|
|
||||||
const geolocation = useGeolocation()
|
|
||||||
const {config} = useAgeAssuranceDataContext()
|
|
||||||
- return useMemo(() => {
|
|
||||||
- if (!config) return
|
|
||||||
- // use generic helper, we want to potentially return undefined
|
|
||||||
- return getAgeAssuranceRegionConfig(config, {
|
|
||||||
- countryCode: geolocation.countryCode ?? '',
|
|
||||||
- regionCode: geolocation.regionCode,
|
|
||||||
- })
|
|
||||||
- }, [config, geolocation])
|
|
||||||
+ return useMemo(() => ({
|
|
||||||
+ countryCode: '*',
|
|
||||||
+ regionCode: undefined,
|
|
||||||
+ rules: [{ $type: ids.Default, access: AgeAssuranceAccess.Full }],
|
|
||||||
+ }), [config, geolocation])
|
|
||||||
}
|
|
||||||
|
|
||||||
-/**
|
|
||||||
- * Some users may have erroneously set their birth date to the current date
|
|
||||||
- * if one wasn't set on their account. We previously didn't do validation on
|
|
||||||
- * the bday dialog, and it defaulted to the current date. This bug _has_ been
|
|
||||||
- * seen in production, so we need to check for it where possible.
|
|
||||||
- */
|
|
||||||
-export function isLegacyBirthdateBug(birthDate: string) {
|
|
||||||
- return ['2025', '2024', '2023'].includes((birthDate || '').slice(0, 4))
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-/**
|
|
||||||
- * Returns whether the user is under the minimum age required to use the app.
|
|
||||||
- * This applies to all regions.
|
|
||||||
- */
|
|
||||||
-export function isUserUnderMinimumAge(birthDate: string) {
|
|
||||||
- return getAge(new Date(birthDate)) < DEFAULT_MIN_AGE
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-export function isUserUnderAdultAge(birthDate: string) {
|
|
||||||
- return getAge(new Date(birthDate)) < 18
|
|
||||||
-}
|
|
||||||
+export function isLegacyBirthdateBug(birthDate: string) { return false }
|
|
||||||
+export function isUserUnderMinimumAge(birthDate: string) { return false }
|
|
||||||
+export function isUserUnderAdultAge(birthDate: string) { return false }
|
|
||||||
diff --git a/src/components/PolicyUpdateOverlay/updates/202508/index.tsx b/src/components/PolicyUpdateOverlay/updates/202508/index.tsx
|
diff --git a/src/components/PolicyUpdateOverlay/updates/202508/index.tsx b/src/components/PolicyUpdateOverlay/updates/202508/index.tsx
|
||||||
index 8365057e8..59c8506a2 100644
|
index 8365057e8..59c8506a2 100644
|
||||||
--- a/src/components/PolicyUpdateOverlay/updates/202508/index.tsx
|
--- a/src/components/PolicyUpdateOverlay/updates/202508/index.tsx
|
||||||
|
|||||||
51
ios/patching/031-social-app-ios-hide-create-account.patch
Normal file
51
ios/patching/031-social-app-ios-hide-create-account.patch
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
diff --git a/src/view/com/auth/SplashScreen.tsx b/src/view/com/auth/SplashScreen.tsx
|
||||||
|
--- a/src/view/com/auth/SplashScreen.tsx
|
||||||
|
+++ b/src/view/com/auth/SplashScreen.tsx
|
||||||
|
@@ -46,23 +46,6 @@ export const SplashScreen = ({
|
||||||
|
<View
|
||||||
|
testID="signinOrCreateAccount"
|
||||||
|
style={[a.px_xl, a.gap_md, a.pb_2xl]}>
|
||||||
|
- <Button
|
||||||
|
- testID="createAccountButton"
|
||||||
|
- onPress={() => {
|
||||||
|
- onPressCreateAccount()
|
||||||
|
- playHaptic('Light')
|
||||||
|
- }}
|
||||||
|
- label={_(msg`Create new account`)}
|
||||||
|
- accessibilityHint={_(
|
||||||
|
- msg`Opens flow to create a new Bluesky account`,
|
||||||
|
- )}
|
||||||
|
- size="large"
|
||||||
|
- variant="solid"
|
||||||
|
- color="primary">
|
||||||
|
- <ButtonText>
|
||||||
|
- <Trans>Create account</Trans>
|
||||||
|
- </ButtonText>
|
||||||
|
- </Button>
|
||||||
|
<Button
|
||||||
|
testID="signInButton"
|
||||||
|
onPress={() => {
|
||||||
|
diff --git a/src/view/com/auth/SplashScreen.web.tsx b/src/view/com/auth/SplashScreen.web.tsx
|
||||||
|
--- a/src/view/com/auth/SplashScreen.web.tsx
|
||||||
|
+++ b/src/view/com/auth/SplashScreen.web.tsx
|
||||||
|
@@ -97,20 +97,6 @@ export const SplashScreen = ({
|
||||||
|
<View
|
||||||
|
testID="signinOrCreateAccount"
|
||||||
|
style={[a.w_full, a.px_xl, a.gap_md, a.pb_2xl, {maxWidth: 320}]}>
|
||||||
|
- <Button
|
||||||
|
- testID="createAccountButton"
|
||||||
|
- onPress={onPressCreateAccount}
|
||||||
|
- label={_(msg`Create new account`)}
|
||||||
|
- accessibilityHint={_(
|
||||||
|
- msg`Opens flow to create a new Bluesky account`,
|
||||||
|
- )}
|
||||||
|
- size="large"
|
||||||
|
- variant="solid"
|
||||||
|
- color="primary">
|
||||||
|
- <ButtonText>
|
||||||
|
- <Trans>Create account</Trans>
|
||||||
|
- </ButtonText>
|
||||||
|
- </Button>
|
||||||
|
<Button
|
||||||
|
testID="signInButton"
|
||||||
|
onPress={onPressSignin}
|
||||||
@@ -43,6 +43,7 @@ PATCH_FILES_IOS=(
|
|||||||
"028-social-app-ios-remove-discover-feeds.patch"
|
"028-social-app-ios-remove-discover-feeds.patch"
|
||||||
"029-social-app-ios-remove-feeds-discover.patch"
|
"029-social-app-ios-remove-feeds-discover.patch"
|
||||||
"030-social-app-ios-appinfo.patch"
|
"030-social-app-ios-appinfo.patch"
|
||||||
|
"031-social-app-ios-hide-create-account.patch"
|
||||||
)
|
)
|
||||||
|
|
||||||
function ios-env() {
|
function ios-env() {
|
||||||
@@ -64,14 +65,6 @@ function apply-patch() {
|
|||||||
|
|
||||||
pushd ${target_dir} > /dev/null
|
pushd ${target_dir} > /dev/null
|
||||||
|
|
||||||
# Check if patch is already applied (reverse dry-run succeeds)
|
|
||||||
if patch -f --dry-run -p1 -R < ${patch_file} > /dev/null 2>&1; then
|
|
||||||
echo "✅ Already applied - skipping"
|
|
||||||
popd > /dev/null
|
|
||||||
echo ""
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if patch can be applied (forward dry-run succeeds)
|
# Check if patch can be applied (forward dry-run succeeds)
|
||||||
if patch --dry-run -p1 < ${patch_file} > /dev/null 2>&1; then
|
if patch --dry-run -p1 < ${patch_file} > /dev/null 2>&1; then
|
||||||
echo "🔧 Applying patch..."
|
echo "🔧 Applying patch..."
|
||||||
|
|||||||
Reference in New Issue
Block a user