mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at thread-bug 151 lines 4.8 kB view raw
1import {type NavigationState, type PartialState} from '@react-navigation/native' 2import {type NativeStackNavigationProp} from '@react-navigation/native-stack' 3 4import {type VideoFeedSourceContext} from '#/screens/VideoFeed/types' 5 6export type {NativeStackScreenProps} from '@react-navigation/native-stack' 7 8export type CommonNavigatorParams = { 9 NotFound: undefined 10 Lists: undefined 11 Moderation: undefined 12 ModerationModlists: undefined 13 ModerationMutedAccounts: undefined 14 ModerationBlockedAccounts: undefined 15 ModerationInteractionSettings: undefined 16 ModerationVerificationSettings: undefined 17 Settings: undefined 18 Profile: {name: string; hideBackButton?: boolean} 19 ProfileFollowers: {name: string} 20 ProfileFollows: {name: string} 21 ProfileKnownFollowers: {name: string} 22 ProfileSearch: {name: string; q?: string} 23 ProfileList: {name: string; rkey: string} 24 PostThread: {name: string; rkey: string} 25 PostLikedBy: {name: string; rkey: string} 26 PostRepostedBy: {name: string; rkey: string} 27 PostQuotes: {name: string; rkey: string} 28 ProfileFeed: { 29 name: string 30 rkey: string 31 feedCacheKey?: 'discover' | 'explore' | undefined 32 } 33 ProfileFeedLikedBy: {name: string; rkey: string} 34 ProfileLabelerLikedBy: {name: string} 35 Debug: undefined 36 DebugMod: undefined 37 SharedPreferencesTester: undefined 38 Log: undefined 39 Support: undefined 40 PrivacyPolicy: undefined 41 TermsOfService: undefined 42 CommunityGuidelines: undefined 43 CopyrightPolicy: undefined 44 LanguageSettings: undefined 45 AppPasswords: undefined 46 SavedFeeds: undefined 47 PreferencesFollowingFeed: undefined 48 PreferencesThreads: undefined 49 PreferencesExternalEmbeds: undefined 50 AccessibilitySettings: undefined 51 AppearanceSettings: undefined 52 AccountSettings: undefined 53 PrivacyAndSecuritySettings: undefined 54 ActivityPrivacySettings: undefined 55 ContentAndMediaSettings: undefined 56 NotificationSettings: undefined 57 ReplyNotificationSettings: undefined 58 MentionNotificationSettings: undefined 59 QuoteNotificationSettings: undefined 60 LikeNotificationSettings: undefined 61 RepostNotificationSettings: undefined 62 NewFollowerNotificationSettings: undefined 63 LikesOnRepostsNotificationSettings: undefined 64 RepostsOnRepostsNotificationSettings: undefined 65 ActivityNotificationSettings: undefined 66 MiscellaneousNotificationSettings: undefined 67 InterestsSettings: undefined 68 AboutSettings: undefined 69 AppIconSettings: undefined 70 Search: {q?: string} 71 Hashtag: {tag: string; author?: string} 72 Topic: {topic: string} 73 MessagesConversation: {conversation: string; embed?: string; accept?: true} 74 MessagesSettings: undefined 75 MessagesInbox: undefined 76 NotificationsActivityList: {posts: string} 77 LegacyNotificationSettings: undefined 78 Feeds: undefined 79 Start: {name: string; rkey: string} 80 StarterPack: {name: string; rkey: string; new?: boolean} 81 StarterPackShort: {code: string} 82 StarterPackWizard: undefined 83 StarterPackEdit: {rkey?: string} 84 VideoFeed: VideoFeedSourceContext 85} 86 87export type BottomTabNavigatorParams = CommonNavigatorParams & { 88 HomeTab: undefined 89 SearchTab: undefined 90 NotificationsTab: undefined 91 MyProfileTab: undefined 92 MessagesTab: undefined 93} 94 95export type HomeTabNavigatorParams = CommonNavigatorParams & { 96 Home: undefined 97} 98 99export type SearchTabNavigatorParams = CommonNavigatorParams & { 100 Search: {q?: string} 101} 102 103export type NotificationsTabNavigatorParams = CommonNavigatorParams & { 104 Notifications: undefined 105} 106 107export type MyProfileTabNavigatorParams = CommonNavigatorParams & { 108 MyProfile: {name: 'me'; hideBackButton: true} 109} 110 111export type MessagesTabNavigatorParams = CommonNavigatorParams & { 112 Messages: {pushToConversation?: string; animation?: 'push' | 'pop'} 113} 114 115export type FlatNavigatorParams = CommonNavigatorParams & { 116 Home: undefined 117 Search: {q?: string} 118 Feeds: undefined 119 Notifications: undefined 120 Messages: {pushToConversation?: string; animation?: 'push' | 'pop'} 121} 122 123export type AllNavigatorParams = CommonNavigatorParams & { 124 HomeTab: undefined 125 Home: undefined 126 SearchTab: undefined 127 Search: {q?: string} 128 Feeds: undefined 129 NotificationsTab: undefined 130 Notifications: undefined 131 MyProfileTab: undefined 132 MessagesTab: undefined 133 Messages: {animation?: 'push' | 'pop'} 134} 135 136// NOTE 137// this isn't strictly correct but it should be close enough 138// a TS wizard might be able to get this 100% 139// -prf 140export type NavigationProp = NativeStackNavigationProp<AllNavigatorParams> 141 142export type State = 143 | NavigationState 144 | Omit<PartialState<NavigationState>, 'stale'> 145 146export type RouteParams = Record<string, string> 147export type MatchResult = {params: RouteParams} 148export type Route = { 149 match: (path: string) => MatchResult | undefined 150 build: (params?: Record<string, any>) => string 151}