Post source handling updates (#8472)
* Add debugs * Key post-source using URI with handle * Enhance * EnHANCE * ENHANCE * ENHANCEEEECEE * ᵉⁿʰᵃⁿᶜᵉ * enhance
This commit is contained in:
@@ -12,7 +12,7 @@ import throttle from 'lodash.throttle'
|
||||
|
||||
import {FEEDBACK_FEEDS, STAGING_FEEDS} from '#/lib/constants'
|
||||
import {logEvent} from '#/lib/statsig/statsig'
|
||||
import {logger} from '#/logger'
|
||||
import {Logger} from '#/logger'
|
||||
import {
|
||||
type FeedDescriptor,
|
||||
type FeedPostSliceItem,
|
||||
@@ -20,6 +20,8 @@ import {
|
||||
import {getItemsForFeedback} from '#/view/com/posts/PostFeed'
|
||||
import {useAgent} from './session'
|
||||
|
||||
const logger = Logger.create(Logger.Context.FeedFeedback)
|
||||
|
||||
export type StateContext = {
|
||||
enabled: boolean
|
||||
onItemSeen: (item: any) => void
|
||||
@@ -89,6 +91,7 @@ export function useFeedFeedback(
|
||||
}
|
||||
sendOrAggregateInteractionsForStats(aggregatedStats.current, interactions)
|
||||
throttledFlushAggregatedStats()
|
||||
logger.debug('flushed')
|
||||
}, [agent, throttledFlushAggregatedStats, feed])
|
||||
|
||||
const sendToFeed = useMemo(
|
||||
@@ -141,6 +144,9 @@ export function useFeedFeedback(
|
||||
if (!enabled) {
|
||||
return
|
||||
}
|
||||
logger.debug('sendInteraction', {
|
||||
...interaction,
|
||||
})
|
||||
if (!history.current.has(interaction)) {
|
||||
history.current.add(interaction)
|
||||
queue.current.add(toString(interaction))
|
||||
|
||||
Reference in New Issue
Block a user