feat(mobile): show sub count in trending
This commit is contained in:
parent
6ac63065c9
commit
bdb6802485
|
|
@ -135,7 +135,7 @@ export const RecommendationTab: TabComponent<{
|
|||
staleTime: 1000 * 60 * 60 * 24, // 1 day
|
||||
})
|
||||
|
||||
const { data: analysisData } = useQuery({
|
||||
const { data: analysisData, isLoading: isAnalysisLoading } = useQuery({
|
||||
queryKey: ["rsshub-analysis", "cache", discoverLanguage],
|
||||
queryFn: () => fetchRsshubAnalysis(LanguageMap[discoverLanguage]).then((res) => res.data),
|
||||
staleTime: 1000 * 60 * 60 * 24, // 1 day
|
||||
|
|
@ -228,7 +228,7 @@ export const RecommendationTab: TabComponent<{
|
|||
|
||||
const insets = useSafeAreaInsets()
|
||||
|
||||
if (isLoading) {
|
||||
if (isLoading || isAnalysisLoading) {
|
||||
return <PlatformActivityIndicator className="flex-1 items-center justify-center" />
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import { ItemPressableStyle } from "@/src/components/ui/pressable/enum"
|
|||
import { ItemPressable } from "@/src/components/ui/pressable/ItemPressable"
|
||||
import { FilterCuteReIcon } from "@/src/icons/filter_cute_re"
|
||||
import { TrendingUpCuteReIcon } from "@/src/icons/trending_up_cute_re"
|
||||
import { User3CuteReIcon } from "@/src/icons/user_3_cute_re"
|
||||
import { useNavigation } from "@/src/lib/navigation/hooks"
|
||||
import { DiscoverSettingsScreen } from "@/src/screens/(modal)/DiscoverSettingsScreen"
|
||||
|
||||
|
|
@ -83,7 +84,12 @@ export const Trending = ({
|
|||
</Text>
|
||||
</View>
|
||||
}
|
||||
/>
|
||||
>
|
||||
<View className="flex flex-row items-center gap-1 opacity-60">
|
||||
<User3CuteReIcon width={13} height={13} />
|
||||
<Text className="text-text text-sm">{item.analytics.subscriptionCount}</Text>
|
||||
</View>
|
||||
</FeedSummary>
|
||||
))
|
||||
)}
|
||||
</View>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,9 @@ const formSchema = z.object({
|
|||
export function FollowFeed(props: { id: string }) {
|
||||
const { id } = props
|
||||
const feed = useFeed(id as string)
|
||||
usePrefetchFeed(id as string)
|
||||
usePrefetchFeed(id as string, {
|
||||
enabled: !feed?.subscriptionCount,
|
||||
})
|
||||
|
||||
if (!feed) {
|
||||
return (
|
||||
|
|
|
|||
Loading…
Reference in New Issue