···64import {PrivacyPolicyScreen} from '#/view/screens/PrivacyPolicy'
65import {ProfileScreen} from '#/view/screens/Profile'
66import {ProfileFeedLikedByScreen} from '#/view/screens/ProfileFeedLikedBy'
67-import {SavedFeeds} from '#/view/screens/SavedFeeds'
68import {Storybook} from '#/view/screens/Storybook'
69import {SupportScreen} from '#/view/screens/Support'
70import {TermsOfServiceScreen} from '#/view/screens/TermsOfService'
···92import {ProfileLabelerLikedByScreen} from '#/screens/Profile/ProfileLabelerLikedBy'
93import {ProfileSearchScreen} from '#/screens/Profile/ProfileSearch'
94import {ProfileListScreen} from '#/screens/ProfileList'
095import {SearchScreen} from '#/screens/Search'
96import {AboutSettingsScreen} from '#/screens/Settings/AboutSettings'
97import {AccessibilitySettingsScreen} from '#/screens/Settings/AccessibilitySettings'
···64import {PrivacyPolicyScreen} from '#/view/screens/PrivacyPolicy'
65import {ProfileScreen} from '#/view/screens/Profile'
66import {ProfileFeedLikedByScreen} from '#/view/screens/ProfileFeedLikedBy'
067import {Storybook} from '#/view/screens/Storybook'
68import {SupportScreen} from '#/view/screens/Support'
69import {TermsOfServiceScreen} from '#/view/screens/TermsOfService'
···91import {ProfileLabelerLikedByScreen} from '#/screens/Profile/ProfileLabelerLikedBy'
92import {ProfileSearchScreen} from '#/screens/Profile/ProfileSearch'
93import {ProfileListScreen} from '#/screens/ProfileList'
94+import {SavedFeeds} from '#/screens/SavedFeeds'
95import {SearchScreen} from '#/screens/Search'
96import {AboutSettingsScreen} from '#/screens/Settings/AboutSettings'
97import {AccessibilitySettingsScreen} from '#/screens/Settings/AccessibilitySettings'
+16-18
src/screens/Feeds/NoFollowingFeed.tsx
···1-import React from 'react'
2-import {View} from 'react-native'
3import {msg, Trans} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
5···9import {InlineLinkText} from '#/components/Link'
10import {Text} from '#/components/Typography'
1112-export function NoFollowingFeed() {
13 const t = useTheme()
14 const {_} = useLingui()
15 const {mutateAsync: addSavedFeeds} = useAddSavedFeedsMutation()
1617- const addRecommendedFeeds = React.useCallback(
18- (e: any) => {
19- e.preventDefault()
2021- addSavedFeeds([
22- {
23- ...TIMELINE_SAVED_FEED,
24- pinned: true,
25- },
26- ])
2728- // prevent navigation
29- return false
30- },
31- [addSavedFeeds],
32- )
3334 return (
35 <View style={[a.flex_row, a.flex_wrap, a.align_center, a.py_md, a.px_lg]}>
···37 <Trans>
38 Looks like you're missing a following feed.{' '}
39 <InlineLinkText
40- to="/"
41 label={_(msg`Add the default feed of only people you follow`)}
42 onPress={addRecommendedFeeds}
43 style={[a.leading_snug]}>
···1+import {type GestureResponderEvent, View} from 'react-native'
02import {msg, Trans} from '@lingui/macro'
3import {useLingui} from '@lingui/react'
4···8import {InlineLinkText} from '#/components/Link'
9import {Text} from '#/components/Typography'
1011+export function NoFollowingFeed({onAddFeed}: {onAddFeed?: () => void}) {
12 const t = useTheme()
13 const {_} = useLingui()
14 const {mutateAsync: addSavedFeeds} = useAddSavedFeedsMutation()
1516+ const addRecommendedFeeds = (e: GestureResponderEvent) => {
17+ e.preventDefault()
01819+ addSavedFeeds([
20+ {
21+ ...TIMELINE_SAVED_FEED,
22+ pinned: true,
23+ },
24+ ])
2526+ onAddFeed?.()
27+28+ // prevent navigation
29+ return false as const
30+ }
3132 return (
33 <View style={[a.flex_row, a.flex_wrap, a.align_center, a.py_md, a.px_lg]}>
···35 <Trans>
36 Looks like you're missing a following feed.{' '}
37 <InlineLinkText
38+ to="#"
39 label={_(msg`Add the default feed of only people you follow`)}
40 onPress={addRecommendedFeeds}
41 style={[a.leading_snug]}>
+10-7
src/screens/Feeds/NoSavedFeedsOfAnyType.tsx
···1-import React from 'react'
2import {View} from 'react-native'
3import {TID} from '@atproto/common-web'
4import {msg, Trans} from '@lingui/macro'
···16 * feeds if pressed. It should only be presented to the user if they actually
17 * have no other feeds saved.
18 */
19-export function NoSavedFeedsOfAnyType() {
000020 const t = useTheme()
21 const {_} = useLingui()
22 const {isPending, mutateAsync: overwriteSavedFeeds} =
23 useOverwriteSavedFeedsMutation()
2425- const addRecommendedFeeds = React.useCallback(async () => {
026 await overwriteSavedFeeds(
27 RECOMMENDED_SAVED_FEEDS.map(f => ({
28 ...f,
29 id: TID.nextStr(),
30 })),
31 )
32- }, [overwriteSavedFeeds])
3334 return (
35 <View
···46 disabled={isPending}
47 label={_(msg`Apply default recommended feeds`)}
48 size="small"
49- variant="solid"
50- color="primary"
51 onPress={addRecommendedFeeds}>
52- <ButtonIcon icon={Plus} position="left" />
53 <ButtonText>{_(msg`Use recommended`)}</ButtonText>
54 </Button>
55 </View>
···01import {View} from 'react-native'
2import {TID} from '@atproto/common-web'
3import {msg, Trans} from '@lingui/macro'
···15 * feeds if pressed. It should only be presented to the user if they actually
16 * have no other feeds saved.
17 */
18+export function NoSavedFeedsOfAnyType({
19+ onAddRecommendedFeeds,
20+}: {
21+ onAddRecommendedFeeds?: () => void
22+}) {
23 const t = useTheme()
24 const {_} = useLingui()
25 const {isPending, mutateAsync: overwriteSavedFeeds} =
26 useOverwriteSavedFeedsMutation()
2728+ const addRecommendedFeeds = async () => {
29+ onAddRecommendedFeeds?.()
30 await overwriteSavedFeeds(
31 RECOMMENDED_SAVED_FEEDS.map(f => ({
32 ...f,
33 id: TID.nextStr(),
34 })),
35 )
36+ }
3738 return (
39 <View
···50 disabled={isPending}
51 label={_(msg`Apply default recommended feeds`)}
52 size="small"
53+ color="primary_subtle"
054 onPress={addRecommendedFeeds}>
55+ <ButtonIcon icon={Plus} />
56 <ButtonText>{_(msg`Use recommended`)}</ButtonText>
57 </Button>
58 </View>