Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok committed Jan 14, 2025
1 parent 82881d1 commit faaff37
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export function IS_PROD_SERVICE(url?: string) {
export const PROD_DEFAULT_FEED = (rkey: string) =>
`at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/${rkey}`

export const STAGING_DEFAULT_FEED = (rkey: string) =>
`at://did:plc:yofh3kx63drvfljkibw5zuxo/app.bsky.feed.generator/${rkey}`

export const POST_IMG_MAX = {
width: 2000,
height: 2000,
Expand Down
20 changes: 20 additions & 0 deletions src/lib/statsig/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,26 @@ export type LogEvents = {
| 'ProfileHeaderSuggestedFollows'
| 'PostOnboardingFindFollows'
}
'suggestedUser:follow': {
logContext:
| 'Explore'
| 'InterstitialDiscover'
| 'InterstitialProfile'
| 'Profile'
location: 'Card' | 'Profile'
recId: number
position: number
}
'suggestedUser:press': {
logContext: 'Explore' | 'InterstitialDiscover' | 'InterstitialProfile'
recId: number
position: number
}
'suggestedUser:seen': {
logContext: 'Explore' | 'InterstitialDiscover' | 'InterstitialProfile'
recId: number
position: number
}
'profile:unfollow': {
logContext:
| 'RecommendedFollowsItem'
Expand Down
7 changes: 5 additions & 2 deletions src/state/feed-feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {AppState, AppStateStatus} from 'react-native'
import {AppBskyFeedDefs} from '@atproto/api'
import throttle from 'lodash.throttle'

import {PROD_DEFAULT_FEED} from '#/lib/constants'
import {PROD_DEFAULT_FEED, STAGING_DEFAULT_FEED} from '#/lib/constants'
import {logEvent} from '#/lib/statsig/statsig'
import {logger} from '#/logger'
import {FeedDescriptor, FeedPostSliceItem} from '#/state/queries/post-feed'
Expand Down Expand Up @@ -155,7 +155,10 @@ export function useFeedFeedbackContext() {
// place, we're hardcoding it to the discover feed.
// -prf
function isDiscoverFeed(feed: FeedDescriptor) {
return feed === `feedgen|${PROD_DEFAULT_FEED('whats-hot')}`
return (
feed === `feedgen|${PROD_DEFAULT_FEED('whats-hot')}` ||
feed === `feedgen|${STAGING_DEFAULT_FEED('thevids')}`
)
}

function toString(interaction: AppBskyFeedDefs.Interaction): string {
Expand Down

0 comments on commit faaff37

Please sign in to comment.