From d727be8c1ad65f664484076bddd57dae9b109a8b Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 7 Aug 2026 02:37:21 +0300 Subject: [PATCH] Fix profile icon on custom feeds (#11408) Co-authored-by: DS Boyce <260543580+ds-boyce@users.noreply.github.com> --- src/Navigation.tsx | 12 +++---- src/lib/routes/types.ts | 4 +-- src/routes.ts | 4 +-- .../CustomFeed/CustomFeedLikedBy.tsx} | 6 ++-- .../components/CustomFeedHeader.tsx} | 4 +-- .../ProfileFeed => CustomFeed}/index.tsx | 32 +++++++++---------- src/view/com/feeds/FeedSourceCard.tsx | 2 +- 7 files changed, 32 insertions(+), 32 deletions(-) rename src/{view/screens/ProfileFeedLikedBy.tsx => screens/CustomFeed/CustomFeedLikedBy.tsx} (80%) rename src/screens/{Profile/components/ProfileFeedHeader.tsx => CustomFeed/components/CustomFeedHeader.tsx} (99%) rename src/screens/{Profile/ProfileFeed => CustomFeed}/index.tsx (90%) diff --git a/src/Navigation.tsx b/src/Navigation.tsx index ab596876aa..ec3072f46d 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -67,13 +67,14 @@ import {NotificationsScreen} from '#/view/screens/Notifications' import {PostThreadScreen} from '#/view/screens/PostThread' import {PrivacyPolicyScreen} from '#/view/screens/PrivacyPolicy' import {ProfileScreen} from '#/view/screens/Profile' -import {ProfileFeedLikedByScreen} from '#/view/screens/ProfileFeedLikedBy' import {StorybookScreen} from '#/view/screens/Storybook' import {SupportScreen} from '#/view/screens/Support' import {TermsOfServiceScreen} from '#/view/screens/TermsOfService' import {BottomBar} from '#/view/shell/bottom-bar/BottomBar' import {createNativeStackNavigatorWithAuth} from '#/view/shell/createNativeStackNavigatorWithAuth' import {BookmarksScreen} from '#/screens/Bookmarks' +import {CustomFeedScreen} from '#/screens/CustomFeed' +import {CustomFeedLikedByScreen} from '#/screens/CustomFeed/CustomFeedLikedBy' import {SharedPreferencesTesterScreen} from '#/screens/E2E/SharedPreferencesTesterScreen' import {FindContactsFlowScreen} from '#/screens/FindContactsFlowScreen' import HashtagScreen from '#/screens/Hashtag' @@ -92,7 +93,6 @@ import {PostLikedByScreen} from '#/screens/Post/PostLikedBy' import {PostQuotesScreen} from '#/screens/Post/PostQuotes' import {PostRepostedByScreen} from '#/screens/Post/PostRepostedBy' import {ProfileKnownFollowersScreen} from '#/screens/Profile/KnownFollowers' -import {ProfileFeedScreen} from '#/screens/Profile/ProfileFeed' import {ProfileFollowersScreen} from '#/screens/Profile/ProfileFollowers' import {ProfileFollowsScreen} from '#/screens/Profile/ProfileFollows' import {ProfileLabelerLikedByScreen} from '#/screens/Profile/ProfileLabelerLikedBy' @@ -288,13 +288,13 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) { })} /> ProfileFeedScreen} + name="CustomFeed" + getComponent={() => CustomFeedScreen} options={{title: title(msg`Feed`)}} /> ProfileFeedLikedByScreen} + name="CustomFeedLikedBy" + getComponent={() => CustomFeedLikedByScreen} options={{title: title(msg`Liked by`)}} /> ({ PostLikedBy: '/profile/:name/post/:rkey/liked-by', PostRepostedBy: '/profile/:name/post/:rkey/reposted-by', PostQuotes: '/profile/:name/post/:rkey/quotes', - ProfileFeed: '/profile/:name/feed/:rkey', - ProfileFeedLikedBy: '/profile/:name/feed/:rkey/liked-by', + CustomFeed: '/profile/:name/feed/:rkey', + CustomFeedLikedBy: '/profile/:name/feed/:rkey/liked-by', ProfileLabelerLikedBy: '/profile/:name/labeler/liked-by', // debug Debug: '/sys/debug', diff --git a/src/view/screens/ProfileFeedLikedBy.tsx b/src/screens/CustomFeed/CustomFeedLikedBy.tsx similarity index 80% rename from src/view/screens/ProfileFeedLikedBy.tsx rename to src/screens/CustomFeed/CustomFeedLikedBy.tsx index a34c943ebd..9bdec0dcb8 100644 --- a/src/view/screens/ProfileFeedLikedBy.tsx +++ b/src/screens/CustomFeed/CustomFeedLikedBy.tsx @@ -8,13 +8,13 @@ import {makeRecordUri} from '#/lib/strings/url-helpers' import {PostLikedBy as PostLikedByComponent} from '#/view/com/post-thread/PostLikedBy' import * as Layout from '#/components/Layout' -type Props = NativeStackScreenProps -export const ProfileFeedLikedByScreen = ({route}: Props) => { +type Props = NativeStackScreenProps +export const CustomFeedLikedByScreen = ({route}: Props) => { const {name, rkey} = route.params const uri = makeRecordUri(name, 'app.bsky.feed.generator', rkey) return ( - + diff --git a/src/screens/Profile/components/ProfileFeedHeader.tsx b/src/screens/CustomFeed/components/CustomFeedHeader.tsx similarity index 99% rename from src/screens/Profile/components/ProfileFeedHeader.tsx rename to src/screens/CustomFeed/components/CustomFeedHeader.tsx index 4cfe838e13..7d6b7da7de 100644 --- a/src/screens/Profile/components/ProfileFeedHeader.tsx +++ b/src/screens/CustomFeed/components/CustomFeedHeader.tsx @@ -52,7 +52,7 @@ import {Text} from '#/components/Typography' import {useAnalytics} from '#/analytics' import {IS_WEB} from '#/env' -export function ProfileFeedHeaderSkeleton() { +export function CustomFeedHeaderSkeleton() { const t = useTheme() return ( @@ -82,7 +82,7 @@ export function ProfileFeedHeaderSkeleton() { ) } -export function ProfileFeedHeader({ +export function CustomFeedHeader({ info, isTrending, }: { diff --git a/src/screens/Profile/ProfileFeed/index.tsx b/src/screens/CustomFeed/index.tsx similarity index 90% rename from src/screens/Profile/ProfileFeed/index.tsx rename to src/screens/CustomFeed/index.tsx index 69f743c03a..4f2a6e0903 100644 --- a/src/screens/Profile/ProfileFeed/index.tsx +++ b/src/screens/CustomFeed/index.tsx @@ -34,18 +34,18 @@ import {FAB} from '#/view/com/util/fab/FAB' import {type ListRef} from '#/view/com/util/List' import {LoadLatestBtn} from '#/view/com/util/load-latest/LoadLatestBtn' import {PostFeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder' -import { - ProfileFeedHeader, - ProfileFeedHeaderSkeleton, -} from '#/screens/Profile/components/ProfileFeedHeader' import {useTheme} from '#/alf' import {EditBig_Stroke2_Corner2_Rounded as EditBigIcon} from '#/components/icons/EditBig' import {HashtagWide_Stroke1_Corner0_Rounded as HashtagWideIcon} from '#/components/icons/Hashtag' import * as Layout from '#/components/Layout' import {IS_NATIVE} from '#/env' +import { + CustomFeedHeader, + CustomFeedHeaderSkeleton, +} from './components/CustomFeedHeader' -type Props = NativeStackScreenProps -export function ProfileFeedScreen(props: Props) { +type Props = NativeStackScreenProps +export function CustomFeedScreen(props: Props) { const {rkey, name: handleOrDid} = props.route.params const feedParams: FeedParams | undefined = props.route.params.feedCacheKey @@ -66,7 +66,7 @@ export function ProfileFeedScreen(props: Props) { if (error && !isRefetching) { return ( - + - + ) : ( - - + + @@ -94,7 +94,7 @@ export function ProfileFeedScreen(props: Props) { ) } -function ProfileFeedScreenIntermediate({ +function CustomFeedScreenIntermediate({ feedUri, feedParams, }: { @@ -107,14 +107,14 @@ function ProfileFeedScreenIntermediate({ if (!preferences || !info) { return ( - + ) } return ( - - +