Some metrics (#7294)
* Add trending metrics * Progress guide events * Fix naming, improve existing events
This commit is contained in:
@@ -3,6 +3,7 @@ import {useLingui} from '@lingui/react'
|
||||
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||
|
||||
import {CommonNavigatorParams} from '#/lib/routes/types'
|
||||
import {logEvent} from '#/lib/statsig/statsig'
|
||||
import {isNative} from '#/platform/detection'
|
||||
import {useAutoplayDisabled, useSetAutoplayDisabled} from '#/state/preferences'
|
||||
import {
|
||||
@@ -120,7 +121,15 @@ export function ContentAndMediaSettingsScreen({}: Props) {
|
||||
name="show_trending_topics"
|
||||
label={_(msg`Enable trending topics`)}
|
||||
value={!trendingDisabled}
|
||||
onChange={value => setTrendingDisabled(!value)}>
|
||||
onChange={value => {
|
||||
const hide = Boolean(!value)
|
||||
if (hide) {
|
||||
logEvent('trendingTopics:hide', {context: 'settings'})
|
||||
} else {
|
||||
logEvent('trendingTopics:show', {context: 'settings'})
|
||||
}
|
||||
setTrendingDisabled(hide)
|
||||
}}>
|
||||
<SettingsList.Item>
|
||||
<SettingsList.ItemIcon icon={Graph} />
|
||||
<SettingsList.ItemText>
|
||||
|
||||
Reference in New Issue
Block a user