248 lines
7.8 KiB
Diff
248 lines
7.8 KiB
Diff
diff --git a/src/view/com/posts/DiscoverFallbackHeader.tsx b/src/view/com/posts/DiscoverFallbackHeader.tsx
|
|
index e35a33aaf..a36f84ae0 100644
|
|
--- a/src/view/com/posts/DiscoverFallbackHeader.tsx
|
|
+++ b/src/view/com/posts/DiscoverFallbackHeader.tsx
|
|
@@ -7,37 +7,5 @@ import {TextLink} from '../util/Link'
|
|
import {Text} from '../util/text/Text'
|
|
|
|
export function DiscoverFallbackHeader() {
|
|
- const pal = usePalette('default')
|
|
- return (
|
|
- <View
|
|
- style={[
|
|
- {
|
|
- flexDirection: 'row',
|
|
- alignItems: 'center',
|
|
- paddingVertical: 12,
|
|
- paddingHorizontal: 12,
|
|
- borderTopWidth: 1,
|
|
- },
|
|
- pal.border,
|
|
- pal.viewLight,
|
|
- ]}>
|
|
- <View style={{width: 68, paddingLeft: 12}}>
|
|
- <InfoCircleIcon size={36} style={pal.textLight} strokeWidth={1.5} />
|
|
- </View>
|
|
- <View style={{flex: 1}}>
|
|
- <Text type="md" style={pal.text}>
|
|
- <Trans>
|
|
- We ran out of posts from your follows. Here's the latest from{' '}
|
|
- <TextLink
|
|
- type="md-medium"
|
|
- href="/profile/bsky.app/feed/whats-hot"
|
|
- text="Discover"
|
|
- style={pal.link}
|
|
- />
|
|
- .
|
|
- </Trans>
|
|
- </Text>
|
|
- </View>
|
|
- </View>
|
|
- )
|
|
+ return null
|
|
}
|
|
diff --git a/src/view/com/posts/FollowingEmptyState.tsx b/src/view/com/posts/FollowingEmptyState.tsx
|
|
index 352cc1dc0..f477521af 100644
|
|
--- a/src/view/com/posts/FollowingEmptyState.tsx
|
|
+++ b/src/view/com/posts/FollowingEmptyState.tsx
|
|
@@ -1,37 +1,14 @@
|
|
import React from 'react'
|
|
import {StyleSheet, View} from 'react-native'
|
|
-import {
|
|
- FontAwesomeIcon,
|
|
- type FontAwesomeIconStyle,
|
|
-} from '@fortawesome/react-native-fontawesome'
|
|
import {Trans} from '@lingui/macro'
|
|
-import {useNavigation} from '@react-navigation/native'
|
|
|
|
import {usePalette} from '#/lib/hooks/usePalette'
|
|
import {MagnifyingGlassIcon} from '#/lib/icons'
|
|
-import {type NavigationProp} from '#/lib/routes/types'
|
|
import {s} from '#/lib/styles'
|
|
-import {isWeb} from '#/platform/detection'
|
|
-import {Button} from '../util/forms/Button'
|
|
import {Text} from '../util/text/Text'
|
|
|
|
export function FollowingEmptyState() {
|
|
const pal = usePalette('default')
|
|
- const palInverted = usePalette('inverted')
|
|
- const navigation = useNavigation<NavigationProp>()
|
|
-
|
|
- const onPressFindAccounts = React.useCallback(() => {
|
|
- if (isWeb) {
|
|
- navigation.navigate('Search', {})
|
|
- } else {
|
|
- navigation.navigate('SearchTab')
|
|
- navigation.popToTop()
|
|
- }
|
|
- }, [navigation])
|
|
-
|
|
- const onPressDiscoverFeeds = React.useCallback(() => {
|
|
- navigation.navigate('Feeds')
|
|
- }, [navigation])
|
|
|
|
return (
|
|
<View style={styles.container}>
|
|
@@ -45,36 +22,6 @@ export function FollowingEmptyState() {
|
|
happening.
|
|
</Trans>
|
|
</Text>
|
|
- <Button
|
|
- type="inverted"
|
|
- style={styles.emptyBtn}
|
|
- onPress={onPressFindAccounts}>
|
|
- <Text type="lg-medium" style={palInverted.text}>
|
|
- <Trans>Find accounts to follow</Trans>
|
|
- </Text>
|
|
- <FontAwesomeIcon
|
|
- icon="angle-right"
|
|
- style={palInverted.text as FontAwesomeIconStyle}
|
|
- size={14}
|
|
- />
|
|
- </Button>
|
|
-
|
|
- <Text type="xl-medium" style={[s.textCenter, pal.text, s.mt20]}>
|
|
- <Trans>You can also discover new Custom Feeds to follow.</Trans>
|
|
- </Text>
|
|
- <Button
|
|
- type="inverted"
|
|
- style={[styles.emptyBtn, s.mt10]}
|
|
- onPress={onPressDiscoverFeeds}>
|
|
- <Text type="lg-medium" style={palInverted.text}>
|
|
- <Trans>Discover new custom feeds</Trans>
|
|
- </Text>
|
|
- <FontAwesomeIcon
|
|
- icon="angle-right"
|
|
- style={palInverted.text as FontAwesomeIconStyle}
|
|
- size={14}
|
|
- />
|
|
- </Button>
|
|
</View>
|
|
</View>
|
|
)
|
|
@@ -98,13 +45,4 @@ const styles = StyleSheet.create({
|
|
marginLeft: 'auto',
|
|
marginRight: 'auto',
|
|
},
|
|
- emptyBtn: {
|
|
- marginVertical: 20,
|
|
- flexDirection: 'row',
|
|
- alignItems: 'center',
|
|
- justifyContent: 'space-between',
|
|
- paddingVertical: 18,
|
|
- paddingHorizontal: 24,
|
|
- borderRadius: 30,
|
|
- },
|
|
})
|
|
diff --git a/src/view/com/posts/FollowingEndOfFeed.tsx b/src/view/com/posts/FollowingEndOfFeed.tsx
|
|
index e3c84d782..efb55d406 100644
|
|
--- a/src/view/com/posts/FollowingEndOfFeed.tsx
|
|
+++ b/src/view/com/posts/FollowingEndOfFeed.tsx
|
|
@@ -1,36 +1,13 @@
|
|
import React from 'react'
|
|
import {Dimensions, StyleSheet, View} from 'react-native'
|
|
-import {
|
|
- FontAwesomeIcon,
|
|
- type FontAwesomeIconStyle,
|
|
-} from '@fortawesome/react-native-fontawesome'
|
|
import {Trans} from '@lingui/macro'
|
|
-import {useNavigation} from '@react-navigation/native'
|
|
|
|
import {usePalette} from '#/lib/hooks/usePalette'
|
|
-import {type NavigationProp} from '#/lib/routes/types'
|
|
import {s} from '#/lib/styles'
|
|
-import {isWeb} from '#/platform/detection'
|
|
-import {Button} from '../util/forms/Button'
|
|
import {Text} from '../util/text/Text'
|
|
|
|
export function FollowingEndOfFeed() {
|
|
const pal = usePalette('default')
|
|
- const palInverted = usePalette('inverted')
|
|
- const navigation = useNavigation<NavigationProp>()
|
|
-
|
|
- const onPressFindAccounts = React.useCallback(() => {
|
|
- if (isWeb) {
|
|
- navigation.navigate('Search', {})
|
|
- } else {
|
|
- navigation.navigate('SearchTab')
|
|
- navigation.popToTop()
|
|
- }
|
|
- }, [navigation])
|
|
-
|
|
- const onPressDiscoverFeeds = React.useCallback(() => {
|
|
- navigation.navigate('Feeds')
|
|
- }, [navigation])
|
|
|
|
return (
|
|
<View
|
|
@@ -41,41 +18,8 @@ export function FollowingEndOfFeed() {
|
|
]}>
|
|
<View style={styles.inner}>
|
|
<Text type="xl-medium" style={[s.textCenter, pal.text]}>
|
|
- <Trans>
|
|
- You've reached the end of your feed! Find some more accounts to
|
|
- follow.
|
|
- </Trans>
|
|
- </Text>
|
|
- <Button
|
|
- type="inverted"
|
|
- style={styles.emptyBtn}
|
|
- onPress={onPressFindAccounts}>
|
|
- <Text type="lg-medium" style={palInverted.text}>
|
|
- <Trans>Find accounts to follow</Trans>
|
|
- </Text>
|
|
- <FontAwesomeIcon
|
|
- icon="angle-right"
|
|
- style={palInverted.text as FontAwesomeIconStyle}
|
|
- size={14}
|
|
- />
|
|
- </Button>
|
|
-
|
|
- <Text type="xl-medium" style={[s.textCenter, pal.text, s.mt20]}>
|
|
- <Trans>You can also discover new Custom Feeds to follow.</Trans>
|
|
+ <Trans>You've reached the end of your feed!</Trans>
|
|
</Text>
|
|
- <Button
|
|
- type="inverted"
|
|
- style={[styles.emptyBtn, s.mt10]}
|
|
- onPress={onPressDiscoverFeeds}>
|
|
- <Text type="lg-medium" style={palInverted.text}>
|
|
- <Trans>Discover new custom feeds</Trans>
|
|
- </Text>
|
|
- <FontAwesomeIcon
|
|
- icon="angle-right"
|
|
- style={palInverted.text as FontAwesomeIconStyle}
|
|
- size={14}
|
|
- />
|
|
- </Button>
|
|
</View>
|
|
</View>
|
|
)
|
|
@@ -93,13 +37,4 @@ const styles = StyleSheet.create({
|
|
width: '100%',
|
|
maxWidth: 460,
|
|
},
|
|
- emptyBtn: {
|
|
- marginVertical: 20,
|
|
- flexDirection: 'row',
|
|
- alignItems: 'center',
|
|
- justifyContent: 'space-between',
|
|
- paddingVertical: 18,
|
|
- paddingHorizontal: 24,
|
|
- borderRadius: 30,
|
|
- },
|
|
})
|
|
diff --git a/src/view/com/posts/PostFeed.tsx b/src/view/com/posts/PostFeed.tsx
|
|
index 4f25468c9..a72a10b80 100644
|
|
--- a/src/view/com/posts/PostFeed.tsx
|
|
+++ b/src/view/com/posts/PostFeed.tsx
|
|
@@ -766,7 +766,7 @@ let PostFeed = ({
|
|
} else if (row.type === 'feedShutdownMsg') {
|
|
return <FeedShutdownMsg feedUri={feedUriOrActorDid} />
|
|
} else if (row.type === 'interstitialFollows') {
|
|
- return <SuggestedFollows feed={feed} />
|
|
+ return null
|
|
} else if (row.type === 'interstitialProgressGuide') {
|
|
return <ProgressGuide />
|
|
} else if (row.type === 'ageAssuranceBanner') {
|