diff --git a/ios/patching/001-social-app-ios-config.patch b/ios/patching/001-social-app-ios-config.patch index 49a4a74..0be2de2 100644 --- a/ios/patching/001-social-app-ios-config.patch +++ b/ios/patching/001-social-app-ios-config.patch @@ -1,9 +1,7 @@ -diff --git a/app.config.js b/app.config.js -index ca417206b..0807d7cd3 100644 --- a/app.config.js +++ b/app.config.js -@@ -18,10 +18,7 @@ module.exports = function (_config) { - const IS_DEV = !IS_TESTFLIGHT || !IS_PRODUCTION +@@ -23,10 +23,7 @@ + const IS_DEV = !IS_TESTFLIGHT && !IS_PRODUCTION const ASSOCIATED_DOMAINS = [ - 'applinks:bsky.app', @@ -14,7 +12,7 @@ index ca417206b..0807d7cd3 100644 // When testing local services, enter an ngrok (et al) domain here. It must use a standard HTTP/HTTPS port. ...(IS_DEV || IS_TESTFLIGHT ? [] : []), ] -@@ -33,27 +30,25 @@ module.exports = function (_config) { +@@ -38,27 +35,25 @@ return { expo: { version: VERSION, @@ -49,16 +47,16 @@ index ca417206b..0807d7cd3 100644 infoPlist: { UIBackgroundModes: ['remote-notification'], NSCameraUsageDescription: -@@ -113,7 +108,7 @@ module.exports = function (_config) { +@@ -118,7 +113,7 @@ entitlements: { 'com.apple.developer.kernel.increased-memory-limit': true, 'com.apple.developer.kernel.extended-virtual-addressing': true, - 'com.apple.security.application-groups': 'group.app.bsky', + 'com.apple.security.application-groups': 'group.ai.syui.at', + // 'com.apple.developer.device-information.user-assigned-device-name': true, }, privacyManifests: { - NSPrivacyCollectedDataTypes: [ -@@ -175,14 +170,14 @@ module.exports = function (_config) { +@@ -181,14 +176,14 @@ barStyle: 'light-content', }, android: { @@ -75,38 +73,16 @@ index ca417206b..0807d7cd3 100644 intentFilters: [ { action: 'VIEW', -@@ -190,7 +185,7 @@ module.exports = function (_config) { +@@ -196,7 +191,7 @@ data: [ { scheme: 'https', - host: 'bsky.app', + host: 'syu.is', }, - IS_DEV && { - scheme: 'http', -@@ -213,9 +208,9 @@ module.exports = function (_config) { - : undefined, - codeSigningMetadata: UPDATES_ENABLED - ? { -- keyid: 'main', -- alg: 'rsa-v1_5-sha256', -- } -+ keyid: 'main', -+ alg: 'rsa-v1_5-sha256', -+ } - : undefined, - checkAutomatically: 'NEVER', - }, -@@ -225,7 +220,7 @@ module.exports = function (_config) { - 'expo-web-browser', - [ - 'react-native-edge-to-edge', -- {android: {enforceNavigationBarContrast: false}}, -+ { android: { enforceNavigationBarContrast: false } }, - ], - USE_SENTRY && [ - '@sentry/react-native/expo', -@@ -265,7 +260,6 @@ module.exports = function (_config) { + ...(IS_DEV + ? [ +@@ -280,7 +275,6 @@ networkInstrumentation: true, }, ], @@ -114,7 +90,7 @@ index ca417206b..0807d7cd3 100644 './plugins/withGradleJVMHeapSizeIncrease.js', './plugins/withAndroidManifestLargeHeapPlugin.js', './plugins/withAndroidManifestFCMIconPlugin.js', -@@ -273,8 +267,6 @@ module.exports = function (_config) { +@@ -288,8 +282,6 @@ './plugins/withAndroidStylesAccentColorPlugin.js', './plugins/withAndroidDayNightThemePlugin.js', './plugins/withAndroidNoJitpackPlugin.js', @@ -123,16 +99,7 @@ index ca417206b..0807d7cd3 100644 [ 'expo-font', { -@@ -387,7 +379,7 @@ module.exports = function (_config) { - }, - }, - ], -- ['expo-screen-orientation', {initialOrientation: 'PORTRAIT_UP'}], -+ ['expo-screen-orientation', { initialOrientation: 'PORTRAIT_UP' }], - ['expo-location'], - [ - 'expo-contacts', -@@ -402,30 +394,7 @@ module.exports = function (_config) { +@@ -417,30 +409,7 @@ build: { experimental: { ios: { diff --git a/ios/patching/005-social-app-ios-screens.patch b/ios/patching/005-social-app-ios-screens.patch index f54c8b0..3998040 100644 --- a/ios/patching/005-social-app-ios-screens.patch +++ b/ios/patching/005-social-app-ios-screens.patch @@ -2,7 +2,7 @@ diff --git a/src/screens/Settings/AboutSettings.tsx b/src/screens/Settings/About index 6b8257b91..48ba7909e 100644 --- a/src/screens/Settings/AboutSettings.tsx +++ b/src/screens/Settings/AboutSettings.tsx -@@ -80,7 +80,7 @@ export function AboutSettingsScreen({}: Props) { +@@ -78,14 +78,14 @@ export function AboutSettingsScreen({}: Props) { -@@ -88,7 +88,7 @@ export function AboutSettingsScreen({}: Props) { + Terms of Service Your account was found to be in violation of the{' '} . You have been sent an email outlining the specific violation and suspension period, if applicable. You can appeal this -diff --git a/src/view/screens/Home.tsx b/src/view/screens/Home.tsx -index e058e2883..8daf41089 100644 ---- a/src/view/screens/Home.tsx -+++ b/src/view/screens/Home.tsx -@@ -1,23 +1,16 @@ - import React from 'react' - import {ActivityIndicator, StyleSheet} from 'react-native' - import {useFocusEffect} from '@react-navigation/native' -- - import {PROD_DEFAULT_FEED} from '#/lib/constants' - import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' - import {useOTAUpdates} from '#/lib/hooks/useOTAUpdates' - import {useSetTitle} from '#/lib/hooks/useSetTitle' - import {useRequestNotificationsPermission} from '#/lib/notifications/notifications' --import { -- type HomeTabNavigatorParams, -- type NativeStackScreenProps, --} from '#/lib/routes/types' -+import {type HomeTabNavigatorParams, type NativeStackScreenProps} from '#/lib/routes/types' - import {logEvent} from '#/lib/statsig/statsig' - import {isWeb} from '#/platform/detection' - import {emitSoftReset} from '#/state/events' --import { -- type SavedFeedSourceInfo, -- usePinnedFeedsInfos, --} from '#/state/queries/feed' -+import {type SavedFeedSourceInfo, usePinnedFeedsInfos} from '#/state/queries/feed' - import {type FeedDescriptor, type FeedParams} from '#/state/queries/post-feed' - import {usePreferencesQuery} from '#/state/queries/preferences' - import {type UsePreferencesQueryResponse} from '#/state/queries/preferences/types' -@@ -27,11 +20,7 @@ import {useLoggedOutViewControls} from '#/state/shell/logged-out' - import {useSelectedFeed, useSetSelectedFeed} from '#/state/shell/selected-feed' - import {FeedPage} from '#/view/com/feeds/FeedPage' - import {HomeHeader} from '#/view/com/home/HomeHeader' --import { -- Pager, -- type PagerRef, -- type RenderTabBarFnProps, --} from '#/view/com/pager/Pager' -+import {Pager, type PagerRef, type RenderTabBarFnProps} from '#/view/com/pager/Pager' - import {CustomFeedEmptyState} from '#/view/com/posts/CustomFeedEmptyState' - import {FollowingEmptyState} from '#/view/com/posts/FollowingEmptyState' - import {FollowingEndOfFeed} from '#/view/com/posts/FollowingEndOfFeed' -@@ -39,97 +28,90 @@ import {NoFeedsPinned} from '#/screens/Home/NoFeedsPinned' - import * as Layout from '#/components/Layout' - import {useDemoMode} from '#/storage/hooks/demo-mode' - -+const SYU_IS_FEED_URI = 'at://did:plc:6qyecktefllvenje24fcxnie/app.bsky.feed.generator/app' -+ -+const DEFAULT_PINNED_FEEDS: any[] = [{ -+ feedDescriptor: 'following', -+ displayName: 'Following', -+ id: 'following', -+ uri: 'following', -+ type: 'feed', -+ savedFeed: undefined, -+ pinned: true, -+ route: { href: '/', name: 'Home', params: {} }, -+ cid: '', -+ avatar: '', -+ creatorDid: '', -+ creatorHandle: '', -+}, { -+ feedDescriptor: `feedgen|${SYU_IS_FEED_URI}`, -+ displayName: 'Feeds', -+ id: SYU_IS_FEED_URI, -+ uri: SYU_IS_FEED_URI, -+ type: 'feed', -+ savedFeed: { -+ type: 'feed', -+ value: SYU_IS_FEED_URI, -+ pinned: true, -+ }, -+ pinned: true, -+ route: { href: '/', name: 'Home', params: {} }, -+ cid: '', -+ avatar: '', -+ creatorDid: '', -+ creatorHandle: '', -+}] -+ - type Props = NativeStackScreenProps - export function HomeScreen(props: Props) { - const {setShowLoggedOut} = useLoggedOutViewControls() - const {data: preferences} = usePreferencesQuery() - const {currentAccount} = useSession() -- const {data: pinnedFeedInfos, isLoading: isPinnedFeedsLoading} = -- usePinnedFeedsInfos() -+ const {data: pinnedFeedInfos} = usePinnedFeedsInfos() -+ -+ const safePreferences = preferences || { feedViewPrefs: { lab_mergeFeedEnabled: false }, savedFeeds: [] } as any -+ // Use user's pinned feeds when logged in and available, otherwise use defaults -+ const safePinnedFeedInfos = !currentAccount -+ ? DEFAULT_PINNED_FEEDS.filter(f => f.feedDescriptor !== 'following') -+ : (pinnedFeedInfos && pinnedFeedInfos.length > 0) -+ ? pinnedFeedInfos -+ : DEFAULT_PINNED_FEEDS - - React.useEffect(() => { - if (isWeb && !currentAccount) { - const getParams = new URLSearchParams(window.location.search) - const splash = getParams.get('splash') -- if (splash === 'true') { -- setShowLoggedOut(true) -- return -- } -+ if (splash === 'true') { setShowLoggedOut(true); return } - } -- - const params = props.route.params -- if ( -- currentAccount && -- props.route.name === 'Start' && -- params?.name && -- params?.rkey -- ) { -- props.navigation.navigate('StarterPack', { -- rkey: params.rkey, -- name: params.name, -- }) -+ if (currentAccount && props.route.name === 'Start' && params?.name && params?.rkey) { -+ props.navigation.navigate('StarterPack', { rkey: params.rkey, name: params.name }) - } -- }, [ -- currentAccount, -- props.navigation, -- props.route.name, -- props.route.params, -- setShowLoggedOut, -- ]) -+ }, [currentAccount, props.navigation, props.route.name, props.route.params, setShowLoggedOut]) - -- if (preferences && pinnedFeedInfos && !isPinnedFeedsLoading) { -- return ( -- -- -- -- ) -- } else { -- return ( -- -- -- -- -- -- ) -- } -+ return ( -+ -+ -+ -+ ) - } - --function HomeScreenReady({ -- preferences, -- pinnedFeedInfos, --}: Props & { -- preferences: UsePreferencesQueryResponse -- pinnedFeedInfos: SavedFeedSourceInfo[] --}) { -- const allFeeds = React.useMemo( -- () => pinnedFeedInfos.map(f => f.feedDescriptor), -- [pinnedFeedInfos], -- ) -- const maybeRawSelectedFeed: FeedDescriptor | undefined = -- useSelectedFeed() ?? allFeeds[0] -+function HomeScreenReady({preferences, pinnedFeedInfos}: any) { -+ const allFeeds = React.useMemo(() => pinnedFeedInfos.map(f => f.feedDescriptor), [pinnedFeedInfos]) -+ const maybeRawSelectedFeed = useSelectedFeed() ?? allFeeds[0] - const setSelectedFeed = useSetSelectedFeed() - const maybeFoundIndex = allFeeds.indexOf(maybeRawSelectedFeed) - const selectedIndex = Math.max(0, maybeFoundIndex) -- const maybeSelectedFeed: FeedDescriptor | undefined = allFeeds[selectedIndex] -+ const maybeSelectedFeed = allFeeds[selectedIndex] - const requestNotificationsPermission = useRequestNotificationsPermission() - - useSetTitle(pinnedFeedInfos[selectedIndex]?.displayName) - useOTAUpdates() -- -- React.useEffect(() => { -- requestNotificationsPermission('Home') -- }, [requestNotificationsPermission]) -+ React.useEffect(() => { requestNotificationsPermission('Home') }, [requestNotificationsPermission]) - - const pagerRef = React.useRef(null) - const lastPagerReportedIndexRef = React.useRef(selectedIndex) - React.useLayoutEffect(() => { -- // Since the pager is not a controlled component, adjust it imperatively -- // if the selected index gets out of sync with what it last reported. -- // This is supposed to only happen on the web when you use the right nav. - if (selectedIndex !== lastPagerReportedIndexRef.current) { - lastPagerReportedIndexRef.current = selectedIndex - pagerRef.current?.setPage(selectedIndex) -@@ -138,205 +120,43 @@ function HomeScreenReady({ - - const {hasSession} = useSession() - const setMinimalShellMode = useSetMinimalShellMode() -- useFocusEffect( -- React.useCallback(() => { -- setMinimalShellMode(false) -- }, [setMinimalShellMode]), -- ) -+ useFocusEffect(React.useCallback(() => { setMinimalShellMode(false) }, [setMinimalShellMode])) - -- useFocusEffect( -- useNonReactiveCallback(() => { -- if (maybeSelectedFeed) { -- logEvent('home:feedDisplayed', { -- index: selectedIndex, -- feedType: maybeSelectedFeed.split('|')[0], -- feedUrl: maybeSelectedFeed, -- reason: 'focus', -- }) -- } -- }), -- ) -- -- const onPageSelected = React.useCallback( -- (index: number) => { -- setMinimalShellMode(false) -- const maybeFeed = allFeeds[index] -+ const onPageSelected = React.useCallback((index) => { -+ setMinimalShellMode(false) -+ const maybeFeed = allFeeds[index] -+ lastPagerReportedIndexRef.current = index -+ setSelectedFeed(maybeFeed) -+ }, [setSelectedFeed, setMinimalShellMode, allFeeds]) - -- // Mutate the ref before setting state to avoid the imperative syncing effect -- // above from starting a loop on Android when swiping back and forth. -- lastPagerReportedIndexRef.current = index -- setSelectedFeed(maybeFeed) -- -- if (maybeFeed) { -- logEvent('home:feedDisplayed', { -- index, -- feedType: maybeFeed.split('|')[0], -- feedUrl: maybeFeed, -- }) -- } -- }, -- [setSelectedFeed, setMinimalShellMode, allFeeds], -- ) -- -- const onPressSelected = React.useCallback(() => { -- emitSoftReset() -- }, []) -- -- const onPageScrollStateChanged = React.useCallback( -- (state: 'idle' | 'dragging' | 'settling') => { -- 'worklet' -- if (state === 'dragging') { -- setMinimalShellMode(false) -- } -- }, -- [setMinimalShellMode], -- ) -+ const onPressSelected = React.useCallback(() => { emitSoftReset() }, []) -+ const onPageScrollStateChanged = React.useCallback((state) => { -+ 'worklet' -+ if (state === 'dragging') setMinimalShellMode(false) -+ }, [setMinimalShellMode]) - - const [demoMode] = useDemoMode() -+ const renderTabBar = React.useCallback((props) => { -+ return -+ }, [onPressSelected, pinnedFeedInfos]) - -- const renderTabBar = React.useCallback( -- (props: RenderTabBarFnProps) => { -- if (demoMode) { -- return ( -- -- ) -- } -- return ( -- -- ) -- }, -- [onPressSelected, pinnedFeedInfos, demoMode], -- ) -- -- const renderFollowingEmptyState = React.useCallback(() => { -- return -- }, []) -+ const renderFollowingEmptyState = React.useCallback(() => , []) -+ const renderCustomFeedEmptyState = React.useCallback(() => , []) - -- const renderCustomFeedEmptyState = React.useCallback(() => { -- return -- }, []) -+ const homeFeedParams = React.useMemo(() => ({ -+ mergeFeedEnabled: false, mergeFeedSources: [] -+ }), [preferences]) - -- const homeFeedParams = React.useMemo(() => { -- return { -- mergeFeedEnabled: Boolean(preferences.feedViewPrefs.lab_mergeFeedEnabled), -- mergeFeedSources: preferences.feedViewPrefs.lab_mergeFeedEnabled -- ? preferences.savedFeeds -- .filter(f => f.type === 'feed' || f.type === 'list') -- .map(f => f.value) -- : [], -- } -- }, [preferences]) -- -- if (demoMode) { -- return ( -- -- -- -- -- ) -- } -- -- return hasSession ? ( -- -- {pinnedFeedInfos.length ? ( -- pinnedFeedInfos.map((feedInfo, index) => { -+ return ( -+ -+ {pinnedFeedInfos.map((feedInfo, index) => { - const feed = feedInfo.feedDescriptor - if (feed === 'following') { -- return ( -- -- ) -+ return - } -- const savedFeedConfig = feedInfo.savedFeed -- return ( -- -- ) -- }) -- ) : ( -- -- )} -- -- ) : ( -- -- -+ return -+ })} - - ) - } -- --const styles = StyleSheet.create({ -- loading: { -- height: '100%', -- alignContent: 'center', -- justifyContent: 'center', -- paddingBottom: 100, -- }, --}) -+const styles = StyleSheet.create({ loading: { height: '100%', alignContent: 'center', justifyContent: 'center', paddingBottom: 100 } }) diff --git a/src/view/screens/PrivacyPolicy.tsx b/src/view/screens/PrivacyPolicy.tsx index a89eaadc4..1da393f03 100644 --- a/src/view/screens/PrivacyPolicy.tsx @@ -506,7 +75,7 @@ index a89eaadc4..1da393f03 100644 - }, [setMinimalShellMode]), - ) +import {useSetTitle} from '#/lib/hooks/useSetTitle' - + +export function PrivacyPolicyScreen() { + useSetTitle('Privacy Policy') return ( @@ -568,7 +137,7 @@ index d843c713c..b81767bd5 100644 - }, [setMinimalShellMode]), - ) +import {useSetTitle} from '#/lib/hooks/useSetTitle' - + +export function TermsOfServiceScreen() { + useSetTitle('Terms of Service') return ( diff --git a/ios/patching/011-social-app-ios-splash-license-footer.patch b/ios/patching/011-social-app-ios-splash-license-footer.patch index 8fc36bb..71ec697 100644 --- a/ios/patching/011-social-app-ios-splash-license-footer.patch +++ b/ios/patching/011-social-app-ios-splash-license-footer.patch @@ -2,59 +2,41 @@ diff --git a/src/view/com/auth/SplashScreen.tsx b/src/view/com/auth/SplashScreen index 3442d1bdf..8ed9e3d0d 100644 --- a/src/view/com/auth/SplashScreen.tsx +++ b/src/view/com/auth/SplashScreen.tsx -@@ -1,4 +1,5 @@ - import {View} from 'react-native' -+import {Pressable, Linking} from 'react-native' +@@ -1,5 +1,6 @@ + import {useMemo} from 'react' +-import {Image as RNImage, View} from 'react-native' ++import {Image as RNImage, View, Pressable, Linking} from 'react-native' ++import {Text} from '#/components/Typography' import Animated, {FadeIn, FadeOut} from 'react-native-reanimated' - import {useSafeAreaInsets} from 'react-native-safe-area-context' + import {Image} from 'expo-image' import {msg, Trans} from '@lingui/macro' -@@ -40,16 +41,6 @@ export const SplashScreen = ({ - - - -- -- -- What's up? -- - - - - - -+ -+ Linking.openURL('https://syu.is/about/support/license')}> -+ -+ License -+ -+ -+ -+ -+ © syui -+ - - +@@ -124,6 +125,18 @@ export const SplashScreen = ({ + + + ++ ++ Linking.openURL('https://syu.is/about/support/license')}> ++ ++ License ++ ++ ++ + + ) diff --git a/src/view/com/auth/SplashScreen.web.tsx b/src/view/com/auth/SplashScreen.web.tsx index 22dd23d7f..7ceb3800e 100644 --- a/src/view/com/auth/SplashScreen.web.tsx +++ b/src/view/com/auth/SplashScreen.web.tsx @@ -94,14 +94,6 @@ export const SplashScreen = ({ - - )} - + + )} + - What's up? - - + Notifications @@ -14,9 +14,9 @@ index 2fa5aa7de..3faf6a7b3 100644 - Content and media - - -- {isNative && +- {IS_NATIVE && - findContactsEnabled && -- !gate('disable_settings_find_contacts') && ( +- !ax.features.enabled(ax.features.ImportContactsSettingsDisable) && ( - @@ -31,7 +31,7 @@ index 2fa5aa7de..3faf6a7b3 100644 -@@ -249,16 +231,6 @@ export function SettingsScreen({}: Props) { +@@ -247,16 +229,6 @@ export function SettingsScreen({}: Props) { Languages diff --git a/ios/patching/021-social-app-ios-clean-feed.patch b/ios/patching/021-social-app-ios-clean-feed.patch index 155b0a2..4aead81 100644 --- a/ios/patching/021-social-app-ios-clean-feed.patch +++ b/ios/patching/021-social-app-ios-clean-feed.patch @@ -4,7 +4,7 @@ index e35a33aaf..a36f84ae0 100644 +++ b/src/view/com/posts/DiscoverFallbackHeader.tsx @@ -7,37 +7,5 @@ import {TextLink} from '../util/Link' import {Text} from '../util/text/Text' - + export function DiscoverFallbackHeader() { - const pal = usePalette('default') - return ( @@ -54,22 +54,22 @@ index 352cc1dc0..f477521af 100644 -} from '@fortawesome/react-native-fontawesome' import {Trans} from '@lingui/macro' -import {useNavigation} from '@react-navigation/native' - + import {usePalette} from '#/lib/hooks/usePalette' import {MagnifyingGlassIcon} from '#/lib/icons' -import {type NavigationProp} from '#/lib/routes/types' import {s} from '#/lib/styles' --import {isWeb} from '#/platform/detection' +-import {IS_WEB} from '#/env' -import {Button} from '../util/forms/Button' import {Text} from '../util/text/Text' - + export function FollowingEmptyState() { const pal = usePalette('default') - const palInverted = usePalette('inverted') - const navigation = useNavigation() - - const onPressFindAccounts = React.useCallback(() => { -- if (isWeb) { +- if (IS_WEB) { - navigation.navigate('Search', {}) - } else { - navigation.navigate('SearchTab') @@ -80,7 +80,7 @@ index 352cc1dc0..f477521af 100644 - const onPressDiscoverFeeds = React.useCallback(() => { - navigation.navigate('Feeds') - }, [navigation]) - + return ( @@ -45,36 +22,6 @@ export function FollowingEmptyState() { @@ -147,21 +147,21 @@ index e3c84d782..efb55d406 100644 -} from '@fortawesome/react-native-fontawesome' import {Trans} from '@lingui/macro' -import {useNavigation} from '@react-navigation/native' - + import {usePalette} from '#/lib/hooks/usePalette' -import {type NavigationProp} from '#/lib/routes/types' import {s} from '#/lib/styles' --import {isWeb} from '#/platform/detection' +-import {IS_WEB} from '#/env' -import {Button} from '../util/forms/Button' import {Text} from '../util/text/Text' - + export function FollowingEndOfFeed() { const pal = usePalette('default') - const palInverted = usePalette('inverted') - const navigation = useNavigation() - - const onPressFindAccounts = React.useCallback(() => { -- if (isWeb) { +- if (IS_WEB) { - navigation.navigate('Search', {}) - } else { - navigation.navigate('SearchTab') @@ -172,7 +172,7 @@ index e3c84d782..efb55d406 100644 - const onPressDiscoverFeeds = React.useCallback(() => { - navigation.navigate('Feeds') - }, [navigation]) - + return ( @@ -10,12 +10,12 @@ - isAtMessages ? ( - - ) : ( - - ) - } @@ -28,10 +28,10 @@ - accessibilityHint={ - numUnreadMessages.count > 0 - ? _( -- msg`${plural(numUnreadMessages.numUnread ?? 0, { +- plural(numUnreadMessages.numUnread ?? 0, { - one: '# unread item', - other: '# unread items', -- })}` || '', +- }), - ) - : '' - } @@ -43,12 +43,12 @@ + isAtMessages ? ( + + ) : ( + + ) + } @@ -61,10 +61,10 @@ + accessibilityHint={ + numUnreadMessages.count > 0 + ? _( -+ msg`${plural(numUnreadMessages.numUnread ?? 0, { ++ plural(numUnreadMessages.numUnread ?? 0, { + one: '# unread item', + other: '# unread items', -+ })}` || '', ++ }), + ) + : '' + } diff --git a/ios/patching/027-social-app-ios-remove-birthdate.patch b/ios/patching/027-social-app-ios-remove-birthdate.patch index 44c4f2a..3ddfc77 100644 --- a/ios/patching/027-social-app-ios-remove-birthdate.patch +++ b/ios/patching/027-social-app-ios-remove-birthdate.patch @@ -1,8 +1,8 @@ --- a/src/screens/Signup/StepInfo/index.tsx +++ b/src/screens/Signup/StepInfo/index.tsx -@@ -9,44 +9,17 @@ +@@ -8,46 +8,18 @@ + import {isEmailMaybeInvalid} from '#/lib/strings/email' import {logger} from '#/logger' - import {isNative} from '#/platform/detection' import {useSignupContext} from '#/screens/Signup/state' -import {Policies} from '#/screens/Signup/StepInfo/Policies' import {atoms as a, native} from '#/alf' @@ -26,6 +26,8 @@ - MIN_ACCESS_AGE, - useAgeAssuranceRegionConfigWithFallback, -} from '#/ageAssurance/util' + import {useAnalytics} from '#/analytics' +-import {IS_NATIVE} from '#/env' -import { - useDeviceGeolocationApi, - useIsDeviceGeolocationGranted, @@ -45,12 +47,12 @@ export function StepInfo({ onPressBack, isServerError, -@@ -70,21 +43,6 @@ +@@ -72,22 +44,7 @@ const emailInputRef = useRef(null) const passwordInputRef = useRef(null) - const birthdateInputRef = useRef(null) -- + - const aaRegionConfig = useAgeAssuranceRegionConfigWithFallback() - const {setDeviceGeolocation} = useDeviceGeolocationApi() - const locationControl = Dialog.useDialogControl() @@ -64,10 +66,11 @@ - ? !isUnderAge(state.dateOfBirth.toISOString(), 18) - : true - const isDeviceGeolocationGranted = useIsDeviceGeolocationGranted() - +- const [hasWarnedEmail, setHasWarnedEmail] = React.useState(false) -@@ -105,10 +63,6 @@ + const tldtsRef = React.useRef(undefined) +@@ -107,10 +64,6 @@ const emailChanged = prevEmailValueRef.current !== email const password = passwordValueRef.current @@ -78,7 +81,7 @@ if (state.serviceDescription?.inviteCodeRequired && !inviteCode) { return dispatch({ type: 'setError', -@@ -275,107 +229,16 @@ +@@ -273,107 +226,16 @@ secureTextEntry autoComplete="new-password" autoCapitalize="none" @@ -91,7 +94,7 @@ passwordRules="minlength: 8;" /> - +- - - - Your birth date @@ -110,7 +113,7 @@ - accessibilityHint={_(msg`Select your date of birth`)} - maximumDate={new Date()} - /> -- + - - - @@ -133,7 +136,7 @@ - - )} - -- {isNative && +- {IS_NATIVE && - !isDeviceGeolocationGranted && - isOverAppMinAccessAge && ( - @@ -165,7 +168,7 @@ - ) : undefined} - - -- {isNative && ( +- {IS_NATIVE && ( - {