diff --git a/ios/patching/009-social-app-ios-license.patch b/ios/patching/009-social-app-ios-license.patch index 0d94461..3b55497 100644 --- a/ios/patching/009-social-app-ios-license.patch +++ b/ios/patching/009-social-app-ios-license.patch @@ -1,53 +1,42 @@ -diff --git a/src/Navigation.tsx b/src/Navigation.tsx -index fa33a9d56..a9b724c4e 100644 ---- a/src/Navigation.tsx -+++ b/src/Navigation.tsx -@@ -67,6 +67,7 @@ import {ProfileFeedLikedByScreen} from '#/view/screens/ProfileFeedLikedBy' - import {Storybook} from '#/view/screens/Storybook' - import {SupportScreen} from '#/view/screens/Support' - import {TermsOfServiceScreen} from '#/view/screens/TermsOfService' -+import {LicenseScreen} from '#/view/screens/License' - import {BottomBar} from '#/view/shell/bottom-bar/BottomBar' - import {createNativeStackNavigatorWithAuth} from '#/view/shell/createNativeStackNavigatorWithAuth' - import {BookmarksScreen} from '#/screens/Bookmarks' -@@ -335,6 +336,11 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) { - getComponent={() => TermsOfServiceScreen} - options={{title: title(msg`Terms of Service`)}} - /> -+ LicenseScreen} -+ options={{title: title(msg`License`)}} -+ /> - CommunityGuidelinesScreen} -diff --git a/src/lib/routes/types.ts b/src/lib/routes/types.ts -index c315a8341..9b2f50a83 100644 ---- a/src/lib/routes/types.ts -+++ b/src/lib/routes/types.ts -@@ -39,6 +39,7 @@ export type CommonNavigatorParams = { - Support: undefined - PrivacyPolicy: undefined - TermsOfService: undefined -+ License: undefined - CommunityGuidelines: undefined - CopyrightPolicy: undefined - LanguageSettings: undefined diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx -index ed2a6cfb7..0b429e6f3 100644 +index ed2a6cfb7..b9776af52 100644 --- a/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx -@@ -460,6 +460,11 @@ function ExtraLinks() { - - Privacy Policy - - +@@ -689,21 +689,25 @@ function ExtraLinks() { + const {_} = useLingui() + const t = useTheme() + const kawaii = useKawaiiMode() ++ const navigation = useNavigation() + + return ( + +- +- Terms of Service +- +- +- Privacy Policy +- ++ navigation.navigate('TermsOfService')}> ++ ++ Terms of Service ++ ++ ++ navigation.navigate('PrivacyPolicy')}> ++ ++ Privacy Policy ++ ++ + navigation.navigate('License')}> + + License + + - - ) - } + {kawaii && ( + + diff --git a/ios/patching/012-social-app-ios-settings-about-help.patch b/ios/patching/012-social-app-ios-settings-about-help.patch index 900df1a..c05ad42 100644 --- a/ios/patching/012-social-app-ios-settings-about-help.patch +++ b/ios/patching/012-social-app-ios-settings-about-help.patch @@ -1,73 +1,16 @@ diff --git a/src/screens/Settings/AboutSettings.tsx b/src/screens/Settings/AboutSettings.tsx -index 6b8257b91..db64d6a69 100644 +index 6b8257b91..88a181dcb 100644 --- a/src/screens/Settings/AboutSettings.tsx +++ b/src/screens/Settings/AboutSettings.tsx -@@ -1,40 +1,40 @@ --import {useMemo} from 'react' --import {Platform} from 'react-native' --import {setStringAsync} from 'expo-clipboard' -+import { useMemo } from 'react' -+import { Platform } from 'react-native' -+import { setStringAsync } from 'expo-clipboard' - import * as FileSystem from 'expo-file-system/legacy' --import {Image} from 'expo-image' --import {msg, Trans} from '@lingui/macro' --import {useLingui} from '@lingui/react' --import {type NativeStackScreenProps} from '@react-navigation/native-stack' --import {useMutation} from '@tanstack/react-query' --import {Statsig} from 'statsig-react-native-expo' -+import { Image } from 'expo-image' -+import { msg, Trans } from '@lingui/macro' -+import { useLingui } from '@lingui/react' -+import { type NativeStackScreenProps } from '@react-navigation/native-stack' -+import { useMutation } from '@tanstack/react-query' -+import { Statsig } from 'statsig-react-native-expo' - --import {STATUS_PAGE_URL} from '#/lib/constants' --import {type CommonNavigatorParams} from '#/lib/routes/types' --import {isAndroid, isIOS, isNative} from '#/platform/detection' -+import { STATUS_PAGE_URL } from '#/lib/constants' -+import { type CommonNavigatorParams } from '#/lib/routes/types' -+import { isAndroid, isIOS, isNative } from '#/platform/detection' - import * as Toast from '#/view/com/util/Toast' - import * as SettingsList from '#/screens/Settings/components/SettingsList' --import {Atom_Stroke2_Corner0_Rounded as AtomIcon} from '#/components/icons/Atom' --import {BroomSparkle_Stroke2_Corner2_Rounded as BroomSparkleIcon} from '#/components/icons/BroomSparkle' --import {CodeLines_Stroke2_Corner2_Rounded as CodeLinesIcon} from '#/components/icons/CodeLines' --import {Globe_Stroke2_Corner0_Rounded as GlobeIcon} from '#/components/icons/Globe' --import {Newspaper_Stroke2_Corner2_Rounded as NewspaperIcon} from '#/components/icons/Newspaper' --import {Wrench_Stroke2_Corner2_Rounded as WrenchIcon} from '#/components/icons/Wrench' -+import { Atom_Stroke2_Corner0_Rounded as AtomIcon } from '#/components/icons/Atom' -+import { BroomSparkle_Stroke2_Corner2_Rounded as BroomSparkleIcon } from '#/components/icons/BroomSparkle' -+import { CodeLines_Stroke2_Corner2_Rounded as CodeLinesIcon } from '#/components/icons/CodeLines' -+import { Globe_Stroke2_Corner0_Rounded as GlobeIcon } from '#/components/icons/Globe' -+import { Newspaper_Stroke2_Corner2_Rounded as NewspaperIcon } from '#/components/icons/Newspaper' -+import { Wrench_Stroke2_Corner2_Rounded as WrenchIcon } from '#/components/icons/Wrench' - import * as Layout from '#/components/Layout' --import {Loader} from '#/components/Loader' -+import { Loader } from '#/components/Loader' - import * as env from '#/env' --import {useDemoMode} from '#/storage/hooks/demo-mode' --import {useDevMode} from '#/storage/hooks/dev-mode' --import {OTAInfo} from './components/OTAInfo' -+import { useDemoMode } from '#/storage/hooks/demo-mode' -+import { useDevMode } from '#/storage/hooks/dev-mode' -+import { OTAInfo } from './components/OTAInfo' +@@ -28,7 +28,7 @@ import {useDevMode} from '#/storage/hooks/dev-mode' + import {OTAInfo} from './components/OTAInfo' type Props = NativeStackScreenProps -export function AboutSettingsScreen({}: Props) { -- const {_, i18n} = useLingui() -+export function AboutSettingsScreen({ }: Props) { -+ const { _, i18n } = useLingui() ++export function AboutSettingsScreen({navigation}: Props) { + const {_, i18n} = useLingui() const [devModeEnabled, setDevModeEnabled] = useDevMode() const [demoModeEnabled, setDemoModeEnabled] = useDemoMode() - const stableID = useMemo(() => Statsig.getStableID(), []) - -- const {mutate: onClearImageCache, isPending: isClearingImageCache} = -+ const { mutate: onClearImageCache, isPending: isClearingImageCache } = - useMutation({ - mutationFn: async () => { - const freeSpaceBefore = await FileSystem.getFreeDiskStorageAsync() @@ -80,7 +80,7 @@ export function AboutSettingsScreen({}: Props) { @@ -77,57 +20,27 @@ index 6b8257b91..db64d6a69 100644 label={_(msg`Terms of Service`)}> -@@ -88,7 +88,15 @@ export function AboutSettingsScreen({}: Props) { +@@ -88,13 +88,22 @@ export function AboutSettingsScreen({}: Props) { + + + Privacy Policy + + ++ navigation.navigate('License')} + label={_(msg`License`)}> + + + License + -+ -+ - - -@@ -131,17 +139,17 @@ export function AboutSettingsScreen({}: Props) { - Toast.show( - newDevModeEnabled - ? _( -- msg({ -- message: 'Developer mode enabled', -- context: 'toast', -- }), -- ) -+ msg({ -+ message: 'Developer mode enabled', -+ context: 'toast', -+ }), -+ ) - : _( -- msg({ -- message: 'Developer mode disabled', -- context: 'toast', -- }), -- ), -+ msg({ -+ message: 'Developer mode disabled', -+ context: 'toast', -+ }), -+ ), - ) - }} - onPress={() => { -@@ -166,7 +174,7 @@ export function AboutSettingsScreen({}: Props) { - setDemoModeEnabled(newDemoModeEnabled) - Toast.show( - 'Demo mode ' + -- (newDemoModeEnabled ? 'enabled' : 'disabled'), -+ (newDemoModeEnabled ? 'enabled' : 'disabled'), - ) - }} - label={ ++ ++ + diff --git a/ios/patching/021-social-app-ios-clean-feed.patch b/ios/patching/021-social-app-ios-clean-feed.patch index b1be019..1d7cc0a 100644 --- a/ios/patching/021-social-app-ios-clean-feed.patch +++ b/ios/patching/021-social-app-ios-clean-feed.patch @@ -1,21 +1,60 @@ -diff --git a/src/view/screens/Home.tsx b/src/view/screens/Home.tsx -index e058e2883..e762b1418 100644 ---- a/src/view/screens/Home.tsx -+++ b/src/view/screens/Home.tsx -@@ -39,6 +39,16 @@ import {NoFeedsPinned} from '#/screens/Home/NoFeedsPinned' - import * as Layout from '#/components/Layout' - import {useDemoMode} from '#/storage/hooks/demo-mode' - -+const DEFAULT_PINNED_FEEDS = [{ -+ feedDescriptor: 'following', -+ displayName: 'Following', -+ id: 'following', -+ type: 'feed', -+ savedFeed: undefined, -+ pinned: true, -+}] -+ -+ - type Props = NativeStackScreenProps - export function HomeScreen(props: Props) { - const {setShowLoggedOut} = useLoggedOutViewControls() +diff --git a/src/view/com/posts/FollowingEmptyState.tsx b/src/view/com/posts/FollowingEmptyState.tsx +index 352cc1dc0..06987be51 100644 +--- a/src/view/com/posts/FollowingEmptyState.tsx ++++ b/src/view/com/posts/FollowingEmptyState.tsx +@@ -45,36 +45,6 @@ export function FollowingEmptyState() { + happening. + + +- +- +- +- You can also discover new Custom Feeds to follow. +- +- + + + ) +diff --git a/src/view/com/posts/PostFeed.tsx b/src/view/com/posts/PostFeed.tsx +index 4f25468c9..c35ad1c1a 100644 +--- a/src/view/com/posts/PostFeed.tsx ++++ b/src/view/com/posts/PostFeed.tsx +@@ -543,14 +543,6 @@ let PostFeed = ({ + }) + } + } else if (feedKind === 'following') { +- if (sliceIndex === 0) { +- // Show composer prompt for Following feed +- if (hasSession && gate('show_composer_prompt')) { +- arr.push({ +- type: 'composerPrompt', +- key: 'composerPrompt-' + sliceIndex, +- }) +- } + } + } else if (feedKind === 'profile') { + if (sliceIndex === 5) { diff --git a/ios/patching/022-social-app-fix-assets.patch b/ios/patching/022-social-app-fix-assets.patch new file mode 100644 index 0000000..a1d6dac --- /dev/null +++ b/ios/patching/022-social-app-fix-assets.patch @@ -0,0 +1,91 @@ +diff --git a/src/view/icons/Logo.tsx b/src/view/icons/Logo.tsx +index d7208df13..2763800ac 100644 +--- a/src/view/icons/Logo.tsx ++++ b/src/view/icons/Logo.tsx +@@ -1,75 +1,17 @@ + import React from 'react' +-import {type TextProps} from 'react-native' +-import Svg, { +- Defs, +- LinearGradient, +- Path, +- type PathProps, +- Stop, +- type SvgProps, +-} from 'react-native-svg' + import {Image} from 'expo-image' ++import {flatten} from '#/alf' + +-import {useKawaiiMode} from '#/state/preferences/kawaii' +-import {flatten, useTheme} from '#/alf' +- +-const ratio = 57 / 64 +- +-type Props = { +- fill?: PathProps['fill'] +- style?: TextProps['style'] +-} & Omit +- +-export const Logo = React.forwardRef(function LogoImpl(props: Props, ref) { +- const t = useTheme() +- const {fill, ...rest} = props +- const gradient = fill === 'sky' +- const styles = flatten(props.style) +- const _fill = gradient +- ? 'url(#sky)' +- : fill || styles?.color || t.palette.primary_500 +- // @ts-ignore it's fiiiiine +- const size = parseInt(rest.width || 32, 10) +- +- const isKawaii = useKawaiiMode() +- +- if (isKawaii) { +- return ( +- 100 +- ? require('../../../assets/kawaii.png') +- : require('../../../assets/kawaii_smol.png') +- } +- accessibilityLabel="Bluesky" +- accessibilityHint="" +- accessibilityIgnoresInvertColors +- style={[{height: size, aspectRatio: 1.4}]} +- /> +- ) +- } +- ++export const Logo = React.forwardRef(function LogoImpl(props: any, ref) { ++ const {width, style} = props ++ // @ts-ignore ++ const size = parseInt(width || 32, 10) + return ( +- +- {gradient && ( +- +- +- +- +- +- +- )} +- +- +- ++ + ) + }) diff --git a/ios/patching/023-social-app-fix-age-assurance.patch b/ios/patching/023-social-app-fix-age-assurance.patch new file mode 100644 index 0000000..fb136e3 --- /dev/null +++ b/ios/patching/023-social-app-fix-age-assurance.patch @@ -0,0 +1,20 @@ +diff --git a/src/ageAssurance/index.tsx b/src/ageAssurance/index.tsx +index 9a0a9c9d5..908dbd567 100644 +--- a/src/ageAssurance/index.tsx ++++ b/src/ageAssurance/index.tsx +@@ -88,12 +88,9 @@ function InnerProvider({children}: {children: React.ReactNode}) { + return ( + { +- const chatDisabled = state.access !== AgeAssuranceAccess.Full +- const isUnderage = data?.birthdate +- ? isUserUnderAdultAge(data.birthdate) +- : true +- const adultContentDisabled = +- state.access !== AgeAssuranceAccess.Full || isUnderage ++ const chatDisabled = false ++ const isUnderage = false ++ const adultContentDisabled = false + return { + Access: AgeAssuranceAccess, + Status: AgeAssuranceStatus, diff --git a/ios/setup.zsh b/ios/setup.zsh index 06ed560..edce1db 100755 --- a/ios/setup.zsh +++ b/ios/setup.zsh @@ -135,6 +135,8 @@ function ios-copy-new-files() { # Copy app-icons if [ -d "$d/ios/app-icons" ]; then cp -rf "$d/ios/app-icons" "$target_dir/assets/" + cp -rf "$d/ios/icon.png" "$target_dir/assets/" + cp -rf "$d/ios/icon.png" "$target_dir/assets/logo.png" echo "✅ Copied app-icons" fi diff --git a/task.md b/task.md index 3136801..be640c2 100644 --- a/task.md +++ b/task.md @@ -2,3 +2,7 @@ - Do not reformat existing code unless explicitly requested. - Maintain existing import styles (newlines, sorting). - Keep patches minimal (clean deltas). + +## Failure Record +- "Do not reformat/minimal patch" violations: >100 (Recorded at User Request) +- Corrective Action: ALWAYS revert file first. NEVER use auto-format tools. USE string replacement scripts. Verify diff lines < 10.