custom social-app service view
This commit is contained in:
@@ -1,29 +1,25 @@
|
||||
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 @@
|
||||
--- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx 2026-02-16 02:12:39
|
||||
+++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx 2026-02-16 02:13:56
|
||||
@@ -1,5 +1,5 @@
|
||||
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,
|
||||
@@ -9,9 +9,11 @@
|
||||
} 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 {
|
||||
@@ -20,7 +22,7 @@
|
||||
useProfileBlockMutationQueue,
|
||||
useProfileFollowMutationQueue,
|
||||
} from '#/state/queries/profile'
|
||||
@@ -31,10 +27,12 @@ diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/
|
||||
+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 {SubscribeProfileButton} from '#/components/activity-notifications/SubscribeProfileButton'
|
||||
@@ -45,6 +47,83 @@
|
||||
import {ProfileHeaderMetrics} from './Metrics'
|
||||
import {ProfileHeaderShell} from './Shell'
|
||||
import {AnimatedProfileHeaderSuggestedFollows} from './SuggestedFollows'
|
||||
|
||||
import {ProfileHeaderSuggestedFollows} from './SuggestedFollows'
|
||||
+
|
||||
+const SERVICE_FAVICONS: Record<string, any> = {
|
||||
+ 'syui.ai': require('../../../../assets/favicons/syui.ai.png'),
|
||||
+ 'bsky.app': require('../../../../assets/favicons/bsky.app.png'),
|
||||
@@ -81,17 +79,29 @@ diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/
|
||||
+ `https://syui.ai/@${profile.handle}/at/service/${service}`,
|
||||
+ )
|
||||
+ }
|
||||
+ style={[a.flex_row, a.align_center, a.gap_xs]}>
|
||||
+ style={[
|
||||
+ a.flex_row,
|
||||
+ a.align_center,
|
||||
+ a.gap_xs,
|
||||
+ a.rounded_full,
|
||||
+ t.atoms.bg_contrast_50,
|
||||
+ {paddingVertical: 6, paddingHorizontal: 10},
|
||||
+ ]}>
|
||||
+ <Image
|
||||
+ source={
|
||||
+ SERVICE_FAVICONS[service] || {
|
||||
+ uri: `https://www.google.com/s2/favicons?domain=${service}&sz=32`,
|
||||
+ }
|
||||
+ }
|
||||
+ style={{width: 16, height: 16, borderRadius: 4}}
|
||||
+ style={{width: 14, height: 14, borderRadius: 3}}
|
||||
+ accessibilityIgnoresInvertColors
|
||||
+ />
|
||||
+ <Text style={[a.text_xs, {color: t.palette.primary_500}]}>
|
||||
+ <Text
|
||||
+ style={[
|
||||
+ a.text_xs,
|
||||
+ a.font_medium,
|
||||
+ t.atoms.text_contrast_medium,
|
||||
+ ]}>
|
||||
+ {service}
|
||||
+ </Text>
|
||||
+ </Pressable>
|
||||
@@ -99,11 +109,10 @@ diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/
|
||||
+ </View>
|
||||
+ )
|
||||
+}
|
||||
+
|
||||
|
||||
interface Props {
|
||||
profile: AppBskyActorDefs.ProfileViewDetailed
|
||||
descriptionRT: RichTextAPI | null
|
||||
@@ -150,6 +217,7 @@
|
||||
@@ -151,6 +230,7 @@
|
||||
{!isPlaceholderProfile && !isBlockedUser && (
|
||||
<View style={a.gap_md}>
|
||||
<ProfileHeaderMetrics profile={profile} />
|
||||
|
||||
50
ios/patching/040-social-app-ios-hide-composer-prompt.patch
Normal file
50
ios/patching/040-social-app-ios-hide-composer-prompt.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
--- a/src/view/com/posts/PostFeed.tsx 2026-02-16 02:19:59
|
||||
+++ b/src/view/com/posts/PostFeed.tsx 2026-02-16 02:20:13
|
||||
@@ -519,16 +519,17 @@
|
||||
key: 'liveEventFeedsAndTrendingBanner-' + sliceIndex,
|
||||
})
|
||||
// Show composer prompt for Discover and Following feeds
|
||||
- if (
|
||||
- hasSession &&
|
||||
- (feedUriOrActorDid === DISCOVER_FEED_URI ||
|
||||
- feed === 'following')
|
||||
- ) {
|
||||
- arr.push({
|
||||
- type: 'composerPrompt',
|
||||
- key: 'composerPrompt-' + sliceIndex,
|
||||
- })
|
||||
- }
|
||||
+ // Disabled: hide composer prompt
|
||||
+ // if (
|
||||
+ // hasSession &&
|
||||
+ // (feedUriOrActorDid === DISCOVER_FEED_URI ||
|
||||
+ // feed === 'following')
|
||||
+ // ) {
|
||||
+ // arr.push({
|
||||
+ // type: 'composerPrompt',
|
||||
+ // key: 'composerPrompt-' + sliceIndex,
|
||||
+ // })
|
||||
+ // }
|
||||
} else if (sliceIndex === 15) {
|
||||
if (areVideoFeedsEnabled && !trendingVideoDisabled) {
|
||||
arr.push({
|
||||
@@ -545,12 +546,13 @@
|
||||
} else if (feedKind === 'following') {
|
||||
if (sliceIndex === 0) {
|
||||
// Show composer prompt for Following feed
|
||||
- if (hasSession) {
|
||||
- arr.push({
|
||||
- type: 'composerPrompt',
|
||||
- key: 'composerPrompt-' + sliceIndex,
|
||||
- })
|
||||
- }
|
||||
+ // Disabled: hide composer prompt
|
||||
+ // if (hasSession) {
|
||||
+ // arr.push({
|
||||
+ // type: 'composerPrompt',
|
||||
+ // key: 'composerPrompt-' + sliceIndex,
|
||||
+ // })
|
||||
+ // }
|
||||
}
|
||||
} else if (feedKind === 'profile') {
|
||||
if (sliceIndex === 5) {
|
||||
@@ -47,6 +47,7 @@ PATCH_FILES_IOS=(
|
||||
"037-social-app-ios-disable-contacts-nux.patch"
|
||||
"038-social-app-ios-profile-services.patch"
|
||||
"039-social-app-ios-hide-feed-controls.patch"
|
||||
"040-social-app-ios-hide-composer-prompt.patch"
|
||||
)
|
||||
|
||||
function ios-env() {
|
||||
|
||||
Reference in New Issue
Block a user