ai/at
1
0

fix patch

This commit is contained in:
2026-02-16 01:23:52 +09:00
parent 718820daec
commit 8b26cf9452
7 changed files with 155 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -0,0 +1,113 @@
diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/Profile/Header/ProfileHeaderStandard.tsx
--- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx
+++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx
@@ -1,25 +1,27 @@
import {memo, useMemo, useState} from 'react'
-import {View} from 'react-native'
+import {Image, Pressable, View} from 'react-native'
import {
type AppBskyActorDefs,
moderateProfile,
type ModerationDecision,
type ModerationOpts,
type RichText as RichTextAPI,
} 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 {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'
import {type Shadow, useProfileShadow} from '#/state/cache/profile-shadow'
import {
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'
@@ -45,6 +47,71 @@
import {ProfileHeaderShell} from './Shell'
import {AnimatedProfileHeaderSuggestedFollows} from './SuggestedFollows'
+const SERVICE_FAVICONS: Record<string, any> = {
+ 'syui.ai': require('../../../../assets/favicons/syui.ai.png'),
+ 'bsky.app': require('../../../../assets/favicons/bsky.app.png'),
+ 'atproto.com': require('../../../../assets/favicons/atproto.com.png'),
+}
+
+function ProfileServiceLinks({
+ profile,
+}: {
+ 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 serviceSet = new Set<string>()
+ for (const nsid of collections) {
+ const parts = nsid.split('.')
+ if (parts.length >= 2) {
+ const domain = parts.slice(0, 2).reverse().join('.')
+ serviceSet.add(domain)
+ }
+ }
+ return Array.from(serviceSet)
+ },
+ })
+
+ if (!services || services.length === 0) return null
+
+ return (
+ <View style={[a.flex_row, a.flex_wrap, a.gap_sm, a.pt_xs]}>
+ {services.map(service => (
+ <Pressable
+ key={service}
+ onPress={() =>
+ openLink(
+ `https://syui.ai/@${profile.handle}/at/service/${service}`,
+ )
+ }
+ style={[a.flex_row, a.align_center, a.gap_xs]}>
+ <Image
+ source={
+ SERVICE_FAVICONS[service] || {
+ uri: `https://www.google.com/s2/favicons?domain=${service}&sz=32`,
+ }
+ }
+ style={{width: 16, height: 16, borderRadius: 4}}
+ accessibilityIgnoresInvertColors
+ />
+ <Text style={[a.text_xs, {color: t.palette.primary_500}]}>
+ {service}
+ </Text>
+ </Pressable>
+ ))}
+ </View>
+ )
+}
+
interface Props {
profile: AppBskyActorDefs.ProfileViewDetailed
descriptionRT: RichTextAPI | null
@@ -150,6 +217,7 @@
{!isPlaceholderProfile && !isBlockedUser && (
<View style={a.gap_md}>
<ProfileHeaderMetrics profile={profile} />
+ <ProfileServiceLinks profile={profile} />
{descriptionRT && !moderation.ui('profileView').blur ? (
<View pointerEvents="auto">
<RichText

View File

@@ -0,0 +1,35 @@
diff --git a/src/view/com/posts/PostFeedItem.tsx b/src/view/com/posts/PostFeedItem.tsx
--- a/src/view/com/posts/PostFeedItem.tsx
+++ b/src/view/com/posts/PostFeedItem.tsx
@@ -385,17 +385,19 @@
threadgateRecord={threadgateRecord}
/>
- <PostControls
- post={post}
- record={record}
- richText={richText}
- onPressReply={onPressReply}
- logContext="FeedItem"
- feedContext={feedContext}
- reqId={reqId}
- threadgateRecord={threadgateRecord}
- onShowLess={onShowLess}
- viaRepost={viaRepost}
- />
+ {false && (
+ <PostControls
+ post={post}
+ record={record}
+ richText={richText}
+ onPressReply={onPressReply}
+ logContext="FeedItem"
+ feedContext={feedContext}
+ reqId={reqId}
+ threadgateRecord={threadgateRecord}
+ onShowLess={onShowLess}
+ viaRepost={viaRepost}
+ />
+ )}
</View>
<DiscoverDebug feedContext={feedContext} />

View File

@@ -45,6 +45,8 @@ PATCH_FILES_IOS=(
"033-social-app-ios-hide-profile-tabs.patch"
"036-social-app-ios-homeheader-loggedout.patch"
"037-social-app-ios-disable-contacts-nux.patch"
"038-social-app-ios-profile-services.patch"
"039-social-app-ios-hide-feed-controls.patch"
)
function ios-env() {