From 7a4f5078e77fa819d798bdb47fde609a09dc84ea Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Sat, 2 Aug 2025 19:59:57 +0800 Subject: [PATCH] fix: set default view for FollowImpl --- apps/mobile/src/modules/feed/FollowFeed.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/mobile/src/modules/feed/FollowFeed.tsx b/apps/mobile/src/modules/feed/FollowFeed.tsx index 6e7a2a94c..b4782c602 100644 --- a/apps/mobile/src/modules/feed/FollowFeed.tsx +++ b/apps/mobile/src/modules/feed/FollowFeed.tsx @@ -78,7 +78,7 @@ function FollowImpl(props: { feedId: string; defaultView?: FeedViewType }) { const { t } = useTranslation() const { t: tCommon } = useTranslation("common") const textLabelColor = useColor("label") - const { feedId: id, defaultView } = props + const { feedId: id, defaultView = FeedViewType.Articles } = props const feed = useFeedById(id) const subscription = useSubscriptionByFeedId(feed?.id) const isSubscribed = !!subscription @@ -89,7 +89,7 @@ function FollowImpl(props: { feedId: string; defaultView?: FeedViewType }) { isPrivate: subscription?.isPrivate ?? undefined, hideFromTimeline: subscription?.hideFromTimeline ?? undefined, title: subscription?.title ?? undefined, - view: subscription?.view ?? defaultView ?? FeedViewType.Articles, + view: subscription?.view ?? defaultView, }, }) useEffect(() => { @@ -290,7 +290,7 @@ function FollowImpl(props: { feedId: string; defaultView?: FeedViewType }) { name="view" control={form.control} render={({ field: { onChange, value } }) => ( - + )} />