add recId to follow dialog
This commit is contained in:
@@ -9,6 +9,7 @@ import {type ModerationOpts} from '@atproto/api'
|
|||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
|
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
|
||||||
import {popularInterests, useInterestsDisplayNames} from '#/lib/interests'
|
import {popularInterests, useInterestsDisplayNames} from '#/lib/interests'
|
||||||
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
||||||
import {useActorSearch} from '#/state/queries/actor-search'
|
import {useActorSearch} from '#/state/queries/actor-search'
|
||||||
@@ -262,7 +263,7 @@ function DialogInner({guide}: {guide?: Follow10ProgressGuide}) {
|
|||||||
const selectedInterestRef = useRef(selectedInterest)
|
const selectedInterestRef = useRef(selectedInterest)
|
||||||
selectedInterestRef.current = selectedInterest
|
selectedInterestRef.current = selectedInterest
|
||||||
|
|
||||||
const onViewableItemsChanged = useRef(
|
const onViewableItemsChanged = useNonReactiveCallback(
|
||||||
({viewableItems}: {viewableItems: ViewToken[]}) => {
|
({viewableItems}: {viewableItems: ViewToken[]}) => {
|
||||||
for (const viewableItem of viewableItems) {
|
for (const viewableItem of viewableItems) {
|
||||||
const item = viewableItem.item as Item
|
const item = viewableItem.item as Item
|
||||||
@@ -274,7 +275,7 @@ function DialogInner({guide}: {guide?: Follow10ProgressGuide}) {
|
|||||||
)
|
)
|
||||||
ax.metric('suggestedUser:seen', {
|
ax.metric('suggestedUser:seen', {
|
||||||
logContext: 'ProgressGuide',
|
logContext: 'ProgressGuide',
|
||||||
recId: undefined,
|
recId: hasSearchText ? undefined : suggestions?.recId,
|
||||||
position: position !== -1 ? position : 0,
|
position: position !== -1 ? position : 0,
|
||||||
suggestedDid: item.profile.did,
|
suggestedDid: item.profile.did,
|
||||||
category: selectedInterestRef.current,
|
category: selectedInterestRef.current,
|
||||||
|
|||||||
Reference in New Issue
Block a user