about summary refs log tree commit diff
path: root/src/lib/routes
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/routes')
-rw-r--r--src/lib/routes/links.ts8
-rw-r--r--src/lib/routes/types.ts9
2 files changed, 14 insertions, 3 deletions
diff --git a/src/lib/routes/links.ts b/src/lib/routes/links.ts
index 8a9950262..10c99b62d 100644
--- a/src/lib/routes/links.ts
+++ b/src/lib/routes/links.ts
@@ -19,9 +19,13 @@ export function makeProfileLink(
 export function makeCustomFeedLink(
   did: string,
   rkey: string,
-  ...segments: string[]
+  segment?: string | undefined,
+  feedCacheKey?: 'discover' | 'explore' | undefined,
 ) {
-  return [`/profile`, did, 'feed', rkey, ...segments].join('/')
+  return (
+    [`/profile`, did, 'feed', rkey, ...(segment ? [segment] : [])].join('/') +
+    (feedCacheKey ? `?feedCacheKey=${encodeURIComponent(feedCacheKey)}` : '')
+  )
 }
 
 export function makeListLink(did: string, rkey: string, ...segments: string[]) {
diff --git a/src/lib/routes/types.ts b/src/lib/routes/types.ts
index d720886e9..66ee7bffa 100644
--- a/src/lib/routes/types.ts
+++ b/src/lib/routes/types.ts
@@ -1,6 +1,8 @@
 import {NavigationState, PartialState} from '@react-navigation/native'
 import type {NativeStackNavigationProp} from '@react-navigation/native-stack'
 
+import {VideoFeedSourceContext} from '#/screens/VideoFeed/types'
+
 export type {NativeStackScreenProps} from '@react-navigation/native-stack'
 
 export type CommonNavigatorParams = {
@@ -20,7 +22,11 @@ export type CommonNavigatorParams = {
   PostLikedBy: {name: string; rkey: string}
   PostRepostedBy: {name: string; rkey: string}
   PostQuotes: {name: string; rkey: string}
-  ProfileFeed: {name: string; rkey: string}
+  ProfileFeed: {
+    name: string
+    rkey: string
+    feedCacheKey?: 'discover' | 'explore' | undefined
+  }
   ProfileFeedLikedBy: {name: string; rkey: string}
   ProfileLabelerLikedBy: {name: string}
   Debug: undefined
@@ -57,6 +63,7 @@ export type CommonNavigatorParams = {
   StarterPackShort: {code: string}
   StarterPackWizard: undefined
   StarterPackEdit: {rkey?: string}
+  VideoFeed: VideoFeedSourceContext
 }
 
 export type BottomTabNavigatorParams = CommonNavigatorParams & {