From 0ef8f22dcb17d6130ef180ec224533133c6e804d Mon Sep 17 00:00:00 2001 From: syui Date: Mon, 16 Feb 2026 05:36:31 +0900 Subject: [PATCH] fix social-app web support link --- ios/patching/002-social-app-ios-lib.patch | 2 +- .../038-social-app-ios-profile-services.patch | 31 +++++++------------ .../043-social-app-ios-rightnav-links.patch | 19 ++++++++++++ ios/patching/ProfileAtLinks.tsx | 15 +++++---- ios/setup.zsh | 1 + 5 files changed, 40 insertions(+), 28 deletions(-) create mode 100644 ios/patching/043-social-app-ios-rightnav-links.patch diff --git a/ios/patching/002-social-app-ios-lib.patch b/ios/patching/002-social-app-ios-lib.patch index 1c1eb89..00f522b 100644 --- a/ios/patching/002-social-app-ios-lib.patch +++ b/ios/patching/002-social-app-ios-lib.patch @@ -38,7 +38,7 @@ index 231447b4f..a44b3da05 100644 -const HELP_DESK_LANG = 'en-us' -export const HELP_DESK_URL = `https://blueskyweb.zendesk.com/hc/${HELP_DESK_LANG}` +const HELP_DESK_LANG = 'ja-jp' -+export const HELP_DESK_URL = '/support/help' ++export const HELP_DESK_URL = '/support/license' export const EMBED_SERVICE = 'https://embed.bsky.app' export const EMBED_SCRIPT = `${EMBED_SERVICE}/static/embed.js` export const BSKY_DOWNLOAD_URL = 'https://bsky.app/download' diff --git a/ios/patching/038-social-app-ios-profile-services.patch b/ios/patching/038-social-app-ios-profile-services.patch index 2586a8f..4867998 100644 --- a/ios/patching/038-social-app-ios-profile-services.patch +++ b/ios/patching/038-social-app-ios-profile-services.patch @@ -1,5 +1,5 @@ ---- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx 2026-02-16 03:00:07 -+++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx 2026-02-16 03:02:25 +--- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx ++++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx @@ -1,5 +1,5 @@ import {memo, useMemo, useState} from 'react' -import {View} from 'react-native' @@ -7,28 +7,20 @@ import { type AppBskyActorDefs, moderateProfile, -@@ -9,9 +9,11 @@ +@@ -9,9 +9,12 @@ } from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' +import {useQuery} from '@tanstack/react-query' import {useActorStatus} from '#/lib/actor-status' ++import {BSKY_SERVICE} from '#/lib/constants' import {useHaptics} from '#/lib/haptics' +import {useOpenLink} from '#/lib/hooks/useOpenLink' import {sanitizeDisplayName} from '#/lib/strings/display-names' import {sanitizeHandle} from '#/lib/strings/handles' import {logger} from '#/logger' -@@ -20,7 +22,7 @@ - useProfileBlockMutationQueue, - useProfileFollowMutationQueue, - } from '#/state/queries/profile' --import {useRequireAuth, useSession} from '#/state/session' -+import {useAgent, useRequireAuth, useSession} from '#/state/session' - import {ProfileMenu} from '#/view/com/profile/ProfileMenu' - import {atoms as a, platform, useBreakpoints, useTheme} from '#/alf' - import {SubscribeProfileButton} from '#/components/activity-notifications/SubscribeProfileButton' -@@ -45,6 +47,83 @@ +@@ -45,6 +48,84 @@ import {ProfileHeaderMetrics} from './Metrics' import {ProfileHeaderShell} from './Shell' import {ProfileHeaderSuggestedFollows} from './SuggestedFollows' @@ -45,16 +37,17 @@ + profile: AppBskyActorDefs.ProfileViewDetailed +}) { + const t = useTheme() -+ const agent = useAgent() + const openLink = useOpenLink() + + const {data: services} = useQuery({ + queryKey: ['profile-services', profile.did], + queryFn: async () => { -+ const res = await agent.com.atproto.repo.describeRepo({ -+ repo: profile.did, -+ }) -+ const collections: string[] = res.data.collections || [] ++ const res = await fetch( ++ `${BSKY_SERVICE}/xrpc/com.atproto.repo.describeRepo?repo=${encodeURIComponent(profile.did)}`, ++ ) ++ if (!res.ok) throw new Error('failed') ++ const data = await res.json() ++ const collections: string[] = data.collections || [] + const serviceSet = new Set() + for (const nsid of collections) { + const parts = nsid.split('.') @@ -112,7 +105,7 @@ interface Props { profile: AppBskyActorDefs.ProfileViewDetailed -@@ -151,6 +230,7 @@ +@@ -151,6 +232,7 @@ {!isPlaceholderProfile && !isBlockedUser && ( diff --git a/ios/patching/043-social-app-ios-rightnav-links.patch b/ios/patching/043-social-app-ios-rightnav-links.patch new file mode 100644 index 0000000..6d4b906 --- /dev/null +++ b/ios/patching/043-social-app-ios-rightnav-links.patch @@ -0,0 +1,19 @@ +--- a/src/view/shell/desktop/RightNav.tsx ++++ b/src/view/shell/desktop/RightNav.tsx +@@ -111,14 +111,14 @@ + + )} + + {_(msg`Privacy`)} + + {' ∙ '} + + {_(msg`Terms`)} diff --git a/ios/patching/ProfileAtLinks.tsx b/ios/patching/ProfileAtLinks.tsx index d6af594..bad7a66 100644 --- a/ios/patching/ProfileAtLinks.tsx +++ b/ios/patching/ProfileAtLinks.tsx @@ -3,8 +3,8 @@ import {Pressable, View} from 'react-native' import {type AppBskyActorDefs} from '@atproto/api' import {useQuery} from '@tanstack/react-query' +import {BSKY_SERVICE} from '#/lib/constants' import {useOpenLink} from '#/lib/hooks/useOpenLink' -import {useAgent} from '#/state/session' import {atoms as a, useTheme} from '#/alf' import {Text} from '#/components/Typography' import {createSinglePathSVG} from '#/components/icons/TEMPLATE' @@ -74,18 +74,17 @@ export function ProfileAtLinks({ profile: AppBskyActorDefs.ProfileViewDetailed }) { const t = useTheme() - const agent = useAgent() const openLink = useOpenLink() const {data: linkData} = useQuery({ queryKey: ['at-links', profile.did], queryFn: async () => { - const res = await agent.com.atproto.repo.getRecord({ - repo: profile.did, - collection: 'ai.syui.at.link', - rkey: 'self', - }) - return res.data.value as LinkCollection + const res = await fetch( + `${BSKY_SERVICE}/xrpc/com.atproto.repo.getRecord?repo=${encodeURIComponent(profile.did)}&collection=ai.syui.at.link&rkey=self`, + ) + if (!res.ok) throw new Error('not found') + const json = await res.json() + return json.value as LinkCollection }, retry: false, staleTime: 1000 * 60 * 5, diff --git a/ios/setup.zsh b/ios/setup.zsh index 9f51585..324212d 100755 --- a/ios/setup.zsh +++ b/ios/setup.zsh @@ -50,6 +50,7 @@ PATCH_FILES_IOS=( "040-social-app-ios-hide-composer-prompt.patch" "041-social-app-ios-splash-signin-button.patch" "042-social-app-ios-at-links.patch" + "043-social-app-ios-rightnav-links.patch" ) function ios-env() {