diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/constants.ts | 5 | ||||
-rw-r--r-- | src/lib/routes/links.ts | 8 | ||||
-rw-r--r-- | src/lib/routes/types.ts | 9 | ||||
-rw-r--r-- | src/lib/statsig/events.ts | 19 |
4 files changed, 34 insertions, 7 deletions
diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 5ae000f72..945e61c99 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -124,6 +124,11 @@ export const BSKY_FEED_OWNER_DIDS = [ export const DISCOVER_FEED_URI = 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot' +export const VIDEO_FEED_URI = + 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/thevids' +export const STAGING_VIDEO_FEED_URI = + 'at://did:plc:yofh3kx63drvfljkibw5zuxo/app.bsky.feed.generator/thevids' +export const VIDEO_FEED_URIS = [VIDEO_FEED_URI, STAGING_VIDEO_FEED_URI] export const DISCOVER_SAVED_FEED = { type: 'feed', value: DISCOVER_FEED_URI, 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 & { diff --git a/src/lib/statsig/events.ts b/src/lib/statsig/events.ts index 19bf06ba9..af759e94e 100644 --- a/src/lib/statsig/events.ts +++ b/src/lib/statsig/events.ts @@ -131,16 +131,16 @@ export type LogEvents = { doesPosterFollowLiker: boolean | undefined likerClout: number | undefined postClout: number | undefined - logContext: 'FeedItem' | 'PostThreadItem' | 'Post' + logContext: 'FeedItem' | 'PostThreadItem' | 'Post' | 'ImmersiveVideo' } 'post:repost': { - logContext: 'FeedItem' | 'PostThreadItem' | 'Post' + logContext: 'FeedItem' | 'PostThreadItem' | 'Post' | 'ImmersiveVideo' } 'post:unlike': { - logContext: 'FeedItem' | 'PostThreadItem' | 'Post' + logContext: 'FeedItem' | 'PostThreadItem' | 'Post' | 'ImmersiveVideo' } 'post:unrepost': { - logContext: 'FeedItem' | 'PostThreadItem' | 'Post' + logContext: 'FeedItem' | 'PostThreadItem' | 'Post' | 'ImmersiveVideo' } 'post:mute': {} 'post:unmute': {} @@ -163,6 +163,7 @@ export type LogEvents = { | 'FeedInterstitial' | 'ProfileHeaderSuggestedFollows' | 'PostOnboardingFindFollows' + | 'ImmersiveVideo' } 'profile:unfollow': { logContext: @@ -179,6 +180,7 @@ export type LogEvents = { | 'FeedInterstitial' | 'ProfileHeaderSuggestedFollows' | 'PostOnboardingFindFollows' + | 'ImmersiveVideo' } 'chat:create': { logContext: 'ProfileHeader' | 'NewChatDialog' | 'SendViaChatDialog' @@ -249,6 +251,15 @@ export type LogEvents = { 'recommendedTopic:click': { context: 'explore' } + 'trendingVideos:show': { + context: 'settings' + } + 'trendingVideos:hide': { + context: 'settings' | 'interstitial:discover' | 'interstitial:explore' + } + 'videoCard:click': { + context: 'interstitial:discover' | 'interstitial:explore' | 'feed' + } 'progressGuide:hide': {} 'progressGuide:followDialog:open': {} |