tweak
This commit is contained in:
+14
-4
@@ -60,13 +60,23 @@ export function IS_PROD_SERVICE(url?: string) {
|
|||||||
return url && url !== STAGING_SERVICE && !url.startsWith(LOCAL_DEV_SERVICE)
|
return url && url !== STAGING_SERVICE && !url.startsWith(LOCAL_DEV_SERVICE)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const PROD_DEFAULT_FEED_DID = 'did:plc:z72i7hdynmk6r22z27h6tvur'
|
|
||||||
export const PROD_DEFAULT_FEED = (rkey: string) =>
|
export const PROD_DEFAULT_FEED = (rkey: string) =>
|
||||||
`at://${PROD_DEFAULT_FEED_DID}/app.bsky.feed.generator/${rkey}`
|
`at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/${rkey}`
|
||||||
|
|
||||||
export const STAGING_DEFAULT_FEED_DID = 'did:plc:yofh3kx63drvfljkibw5zuxo'
|
|
||||||
export const STAGING_DEFAULT_FEED = (rkey: string) =>
|
export const STAGING_DEFAULT_FEED = (rkey: string) =>
|
||||||
`at://${STAGING_DEFAULT_FEED_DID}/app.bsky.feed.generator/${rkey}`
|
`at://did:plc:yofh3kx63drvfljkibw5zuxo/app.bsky.feed.generator/${rkey}`
|
||||||
|
|
||||||
|
export const PROD_FEEDS = [
|
||||||
|
`feedgen|${PROD_DEFAULT_FEED('whats-hot')}`,
|
||||||
|
`feedgen|${PROD_DEFAULT_FEED('thevids')}`,
|
||||||
|
]
|
||||||
|
|
||||||
|
export const STAGING_FEEDS = [
|
||||||
|
`feedgen|${STAGING_DEFAULT_FEED('whats-hot')}`,
|
||||||
|
`feedgen|${STAGING_DEFAULT_FEED('thevids')}`,
|
||||||
|
]
|
||||||
|
|
||||||
|
export const FEEDBACK_FEEDS = [...PROD_FEEDS, ...STAGING_FEEDS]
|
||||||
|
|
||||||
export const POST_IMG_MAX = {
|
export const POST_IMG_MAX = {
|
||||||
width: 2000,
|
width: 2000,
|
||||||
|
|||||||
@@ -3,11 +3,7 @@ import {AppState, AppStateStatus} from 'react-native'
|
|||||||
import {AppBskyFeedDefs} from '@atproto/api'
|
import {AppBskyFeedDefs} from '@atproto/api'
|
||||||
import throttle from 'lodash.throttle'
|
import throttle from 'lodash.throttle'
|
||||||
|
|
||||||
import {
|
import {FEEDBACK_FEEDS, STAGING_FEEDS} from '#/lib/constants'
|
||||||
PROD_DEFAULT_FEED,
|
|
||||||
STAGING_DEFAULT_FEED,
|
|
||||||
STAGING_DEFAULT_FEED_DID,
|
|
||||||
} from '#/lib/constants'
|
|
||||||
import {logEvent} from '#/lib/statsig/statsig'
|
import {logEvent} from '#/lib/statsig/statsig'
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {FeedDescriptor, FeedPostSliceItem} from '#/state/queries/post-feed'
|
import {FeedDescriptor, FeedPostSliceItem} from '#/state/queries/post-feed'
|
||||||
@@ -52,7 +48,7 @@ export function useFeedFeedback(feed: FeedDescriptor, hasSession: boolean) {
|
|||||||
queue.current.clear()
|
queue.current.clear()
|
||||||
|
|
||||||
let proxyDid = 'did:web:discover.bsky.app'
|
let proxyDid = 'did:web:discover.bsky.app'
|
||||||
if (feed.includes(STAGING_DEFAULT_FEED_DID)) {
|
if (STAGING_FEEDS.includes(feed)) {
|
||||||
proxyDid = 'did:web:algo.pop2.bsky.app'
|
proxyDid = 'did:web:algo.pop2.bsky.app'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,11 +161,7 @@ export function useFeedFeedbackContext() {
|
|||||||
// place, we're hardcoding it to the discover feed.
|
// place, we're hardcoding it to the discover feed.
|
||||||
// -prf
|
// -prf
|
||||||
function isDiscoverFeed(feed: FeedDescriptor) {
|
function isDiscoverFeed(feed: FeedDescriptor) {
|
||||||
return (
|
return FEEDBACK_FEEDS.includes(feed)
|
||||||
feed === `feedgen|${PROD_DEFAULT_FEED('whats-hot')}` ||
|
|
||||||
feed === `feedgen|${PROD_DEFAULT_FEED('thevids')}` ||
|
|
||||||
feed === `feedgen|${STAGING_DEFAULT_FEED('thevids')}`
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function toString(interaction: AppBskyFeedDefs.Interaction): string {
|
function toString(interaction: AppBskyFeedDefs.Interaction): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user