From 8ae8929be2ae56fb63d951c5bd28e7417225d5e3 Mon Sep 17 00:00:00 2001 From: syui Date: Sun, 7 Dec 2025 23:30:27 +0900 Subject: [PATCH] fix --- ios/patching/003-social-app-ios-view.patch | 2 +- ...2-social-app-ios-settings-about-help.patch | 123 ++-------- .../021-social-app-ios-clean-feed.patch | 210 ++++++++++++++++-- ios/patching/README.md | 3 + ios/setup.zsh | 1 + 5 files changed, 208 insertions(+), 131 deletions(-) diff --git a/ios/patching/003-social-app-ios-view.patch b/ios/patching/003-social-app-ios-view.patch index 809f0d2..539fedb 100644 --- a/ios/patching/003-social-app-ios-view.patch +++ b/ios/patching/003-social-app-ios-view.patch @@ -104,7 +104,7 @@ index d7208df13..b711f71c7 100644 - /> - + --export function AboutSettingsScreen({}: Props) { -- const {_, i18n} = useLingui() -+export function AboutSettingsScreen({ }: 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,11 +11,19 @@ index 6b8257b91..db64d6a69 100644 label={_(msg`Terms of Service`)}> -@@ -88,7 +88,15 @@ export function AboutSettingsScreen({}: Props) { +@@ -88,13 +88,21 @@ export function AboutSettingsScreen({}: Props) { + + + Privacy Policy + + ++ + @@ -89,45 +31,6 @@ index 6b8257b91..db64d6a69 100644 + 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..cf47032 100644 --- a/ios/patching/021-social-app-ios-clean-feed.patch +++ b/ios/patching/021-social-app-ios-clean-feed.patch @@ -1,21 +1,191 @@ -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' +diff --git a/src/view/com/posts/FollowingEmptyState.tsx b/src/view/com/posts/FollowingEmptyState.tsx +index 352cc1dc0..f477521af 100644 +--- a/src/view/com/posts/FollowingEmptyState.tsx ++++ b/src/view/com/posts/FollowingEmptyState.tsx +@@ -1,37 +1,14 @@ + import React from 'react' + import {StyleSheet, View} from 'react-native' +-import { +- FontAwesomeIcon, +- type FontAwesomeIconStyle, +-} from '@fortawesome/react-native-fontawesome' + import {Trans} from '@lingui/macro' +-import {useNavigation} from '@react-navigation/native' -+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() + 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 {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) { +- navigation.navigate('Search', {}) +- } else { +- navigation.navigate('SearchTab') +- navigation.popToTop() +- } +- }, [navigation]) +- +- const onPressDiscoverFeeds = React.useCallback(() => { +- navigation.navigate('Feeds') +- }, [navigation]) + + return ( + +@@ -45,36 +22,6 @@ export function FollowingEmptyState() { + happening. + + +- +- +- +- You can also discover new Custom Feeds to follow. +- +- + + + ) +@@ -98,13 +45,4 @@ const styles = StyleSheet.create({ + marginLeft: 'auto', + marginRight: 'auto', + }, +- emptyBtn: { +- marginVertical: 20, +- flexDirection: 'row', +- alignItems: 'center', +- justifyContent: 'space-between', +- paddingVertical: 18, +- paddingHorizontal: 24, +- borderRadius: 30, +- }, + }) +diff --git a/src/view/com/posts/FollowingEndOfFeed.tsx b/src/view/com/posts/FollowingEndOfFeed.tsx +index e3c84d782..efb55d406 100644 +--- a/src/view/com/posts/FollowingEndOfFeed.tsx ++++ b/src/view/com/posts/FollowingEndOfFeed.tsx +@@ -1,36 +1,13 @@ + import React from 'react' + import {Dimensions, StyleSheet, View} from 'react-native' +-import { +- FontAwesomeIcon, +- type FontAwesomeIconStyle, +-} 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 {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) { +- navigation.navigate('Search', {}) +- } else { +- navigation.navigate('SearchTab') +- navigation.popToTop() +- } +- }, [navigation]) +- +- const onPressDiscoverFeeds = React.useCallback(() => { +- navigation.navigate('Feeds') +- }, [navigation]) + + return ( + + + +- +- You've reached the end of your feed! Find some more accounts to +- follow. +- +- +- +- +- +- You can also discover new Custom Feeds to follow. ++ You've reached the end of your feed! + +- + + + ) +@@ -93,13 +37,4 @@ const styles = StyleSheet.create({ + width: '100%', + maxWidth: 460, + }, +- emptyBtn: { +- marginVertical: 20, +- flexDirection: 'row', +- alignItems: 'center', +- justifyContent: 'space-between', +- paddingVertical: 18, +- paddingHorizontal: 24, +- borderRadius: 30, +- }, + }) diff --git a/ios/patching/README.md b/ios/patching/README.md index 29e7a66..ba3260a 100644 --- a/ios/patching/README.md +++ b/ios/patching/README.md @@ -17,6 +17,9 @@ - `011-social-app-ios-splash-license-footer.patch` - スプラッシュ画面の「What's up?」削除、© syui フッター追加 - `012-social-app-ios-settings-about-help.patch` - About 設定のリンク修正(syu.is に変更) - `013-social-app-ios-settings-remove-help.patch` - Settings から Help 項目を削除 +- `019-social-app-ios-entitlements-plugin.patch` - iOS entitlements プラグイン設定 +- `020-social-app-ios-bypass-age-assurance.patch` - 年齢確認を完全に無効化 +- `021-social-app-ios-clean-feed.patch` - Following フィードのシンプル化(おすすめ・Discover削除) - `License.tsx` - ライセンス表示画面(新規ファイル) ## 使用方法 diff --git a/ios/setup.zsh b/ios/setup.zsh index 06ed560..feb6596 100755 --- a/ios/setup.zsh +++ b/ios/setup.zsh @@ -26,6 +26,7 @@ PATCH_FILES_IOS=( "013-social-app-ios-settings-remove-help.patch" "019-social-app-ios-entitlements-plugin.patch" "020-social-app-ios-bypass-age-assurance.patch" + "021-social-app-ios-clean-feed.patch" ) function ios-env() {