Make trending setting global

This commit is contained in:
Eric Bailey
2024-12-17 17:39:54 -06:00
parent 30207577b7
commit 41c74e0199
7 changed files with 36 additions and 77 deletions
@@ -2,6 +2,7 @@ import {View} from 'react-native'
import {Trans} from '@lingui/macro'
import {isWeb} from '#/platform/detection'
import {useTrendingSettings} from '#/state/preferences/trending'
import {
DEFAULT_LIMIT as TRENDING_TOPICS_COUNT,
useTrendingTopics,
@@ -19,7 +20,8 @@ import {Text} from '#/components/Typography'
export function ExploreTrendingTopics() {
const {enabled} = useTrendingConfig()
return enabled ? <Inner /> : null
const {trendingDisabled} = useTrendingSettings()
return enabled && !trendingDisabled ? <Inner /> : null
}
function Inner() {