diff --git a/ios/patching/002-social-app-ios-lib.patch b/ios/patching/002-social-app-ios-lib.patch index cfa2931..dc0ec50 100644 --- a/ios/patching/002-social-app-ios-lib.patch +++ b/ios/patching/002-social-app-ios-lib.patch @@ -147,7 +147,7 @@ diff --git a/src/state/queries/feed.ts b/src/state/queries/feed.ts index de1e92533..3d1566800 100644 --- a/src/state/queries/feed.ts +++ b/src/state/queries/feed.ts -@@ -201,14 +201,7 @@ export function useFeedSourceInfoQuery({uri}: {uri: string}) { +@@ -201,14 +201,6 @@ export function useFeedSourceInfoQuery({uri}: {uri: string}) { // for the ones we know need it // -prf export const KNOWN_AUTHED_ONLY_FEEDS = [ @@ -159,9 +159,8 @@ index de1e92533..3d1566800 100644 - 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/mutuals', // mutuals, by bluesky - 'at://did:plc:q6gjnaw2blty4crticxkmujt/app.bsky.feed.generator/my-followers', // followers, by jaz - 'at://did:plc:vpkhqolt662uhesyj6nxm7ys/app.bsky.feed.generator/followpics', // the gram, by why -+ 'at://did:plc:6qyecktefllvenje24fcxnie/app.bsky.feed.generator/app', // app feed, by syu.is ] - + type GetPopularFeedsOptions = {limit?: number; enabled?: boolean} diff --git a/src/state/queries/preferences/index.ts b/src/state/queries/preferences/index.ts index 0cf6ab546..399e592bc 100644 @@ -216,3 +215,4 @@ index 620382175..928480da2 100644 style={[a.text_md]}> Discover {' '} + diff --git a/ios/patching/005-social-app-ios-screens.patch b/ios/patching/005-social-app-ios-screens.patch index 1853137..df9d234 100644 --- a/ios/patching/005-social-app-ios-screens.patch +++ b/ios/patching/005-social-app-ios-screens.patch @@ -105,7 +105,7 @@ index e058e2883..0f583c915 100644 + const {data: pinnedFeedInfos} = usePinnedFeedsInfos() + + const safePreferences = preferences || { feedViewPrefs: { lab_mergeFeedEnabled: false }, savedFeeds: [] } as any -+ const safePinnedFeedInfos = pinnedFeedInfos || DEFAULT_PINNED_FEEDS ++ const safePinnedFeedInfos = DEFAULT_PINNED_FEEDS React.useEffect(() => { if (isWeb && !currentAccount) { diff --git a/ios/patching/032-social-app-ios-feed-loggedout.patch b/ios/patching/032-social-app-ios-feed-loggedout.patch new file mode 100644 index 0000000..dbe4ad7 --- /dev/null +++ b/ios/patching/032-social-app-ios-feed-loggedout.patch @@ -0,0 +1,30 @@ +diff --git a/src/lib/api/feed/custom.ts b/src/lib/api/feed/custom.ts +index 123456789..987654321 100644 +--- a/src/lib/api/feed/custom.ts ++++ b/src/lib/api/feed/custom.ts +@@ -6,6 +6,7 @@ import { + jsonStringToLex, + } from '@atproto/api' + ++import {PUBLIC_APPVIEW} from '#/lib/constants' + import { + getAppLanguageAsContentLanguage, + getContentLanguages, +@@ -119,7 +120,7 @@ async function loggedOutFetch({ + + // manually construct fetch call so we can add the `lang` cache-busting param + let res = await fetch( +- `https://api.bsky.app/xrpc/app.bsky.feed.getFeed?feed=${feed}${ ++ `${PUBLIC_APPVIEW}/xrpc/app.bsky.feed.getFeed?feed=${encodeURIComponent(feed)}${ + cursor ? `&cursor=${cursor}` : '' + }&limit=${limit}&lang=${contentLangs}`, + { +@@ -139,7 +140,7 @@ async function loggedOutFetch({ + + // no data, try again with language headers removed + res = await fetch( +- `https://api.bsky.app/xrpc/app.bsky.feed.getFeed?feed=${feed}${ ++ `${PUBLIC_APPVIEW}/xrpc/app.bsky.feed.getFeed?feed=${encodeURIComponent(feed)}${ + cursor ? `&cursor=${cursor}` : '' + }&limit=${limit}`, + {method: 'GET', headers: {'Accept-Language': '', ...labelersHeader}}, diff --git a/ios/patching/033-social-app-ios-hide-profile-tabs.patch b/ios/patching/033-social-app-ios-hide-profile-tabs.patch new file mode 100644 index 0000000..cea147e --- /dev/null +++ b/ios/patching/033-social-app-ios-hide-profile-tabs.patch @@ -0,0 +1,23 @@ +diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx +index 123456789..987654321 100644 +--- a/src/view/screens/Profile.tsx ++++ b/src/view/screens/Profile.tsx +@@ -218,13 +218,13 @@ function ProfileScreenLoaded({ + const showPostsTab = true + const showRepliesTab = hasSession + const showMediaTab = !hasLabeler +- const showVideosTab = !hasLabeler ++ const showVideosTab = false + const showLikesTab = isMe + const feedGenCount = profile.associated?.feedgens || 0 +- const showFeedsTab = isMe || feedGenCount > 0 ++ const showFeedsTab = false + const starterPackCount = profile.associated?.starterPacks || 0 +- const showStarterPacksTab = isMe || starterPackCount > 0 ++ const showStarterPacksTab = false + // subtract starterpack count from list count, since starterpacks are a type of list + const listCount = (profile.associated?.lists || 0) - starterPackCount +- const showListsTab = hasSession && (isMe || listCount > 0) ++ const showListsTab = false + + const sectionTitles = [ diff --git a/ios/patching/034-social-app-ios-home-header-no-feeds.patch b/ios/patching/034-social-app-ios-home-header-no-feeds.patch new file mode 100644 index 0000000..f149b0c --- /dev/null +++ b/ios/patching/034-social-app-ios-home-header-no-feeds.patch @@ -0,0 +1,19 @@ +diff --git a/src/view/com/home/HomeHeader.tsx b/src/view/com/home/HomeHeader.tsx +index 4a2cf881f..0dd8547f7 100644 +--- a/src/view/com/home/HomeHeader.tsx ++++ b/src/view/com/home/HomeHeader.tsx +@@ -28,12 +28,8 @@ export function HomeHeader( + }, [feeds, hasSession]) + + const items = React.useMemo(() => { +- const pinnedNames = feeds.map(f => f.displayName) +- if (!hasPinnedCustom) { +- return pinnedNames.concat('Feeds ✨') +- } +- return pinnedNames +- }, [hasPinnedCustom, feeds]) ++ return ['Following'] ++ }, []) + + const onPressFeedsLink = React.useCallback(() => { + navigation.navigate('Feeds') diff --git a/ios/setup.zsh b/ios/setup.zsh index 7237744..ab92a30 100755 --- a/ios/setup.zsh +++ b/ios/setup.zsh @@ -44,6 +44,9 @@ PATCH_FILES_IOS=( "029-social-app-ios-remove-feeds-discover.patch" "030-social-app-ios-appinfo.patch" "031-social-app-ios-hide-create-account.patch" + "032-social-app-ios-feed-loggedout.patch" + "033-social-app-ios-hide-profile-tabs.patch" + "034-social-app-ios-home-header-no-feeds.patch" ) function ios-env() {