import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {NativeStackScreenProps} from '@react-navigation/native-stack' import {CommonNavigatorParams} from '#/lib/routes/types' import {isNative} from '#/platform/detection' import {useAutoplayDisabled, useSetAutoplayDisabled} from '#/state/preferences' import { useInAppBrowser, useSetInAppBrowser, } from '#/state/preferences/in-app-browser' import { useOptOutOfUtm, useSetOptOutOfUtm, } from '#/state/preferences/opt-out-of-utm' import * as SettingsList from '#/screens/Settings/components/SettingsList' import {atoms as a} from '#/alf' import {Admonition} from '#/components/Admonition' import * as Toggle from '#/components/forms/Toggle' import {Bubbles_Stroke2_Corner2_Rounded as BubblesIcon} from '#/components/icons/Bubble' import {ChainLink3_Stroke2_Corner0_Rounded as ChainLinkIcon} from '#/components/icons/ChainLink' import {Hashtag_Stroke2_Corner0_Rounded as HashtagIcon} from '#/components/icons/Hashtag' import {Home_Stroke2_Corner2_Rounded as HomeIcon} from '#/components/icons/Home' import {Macintosh_Stroke2_Corner2_Rounded as MacintoshIcon} from '#/components/icons/Macintosh' import {Play_Stroke2_Corner2_Rounded as PlayIcon} from '#/components/icons/Play' import {Window_Stroke2_Corner2_Rounded as WindowIcon} from '#/components/icons/Window' import * as Layout from '#/components/Layout' type Props = NativeStackScreenProps< CommonNavigatorParams, 'ContentAndMediaSettings' > export function ContentAndMediaSettingsScreen({}: Props) { const {_} = useLingui() const autoplayDisabledPref = useAutoplayDisabled() const setAutoplayDisabledPref = useSetAutoplayDisabled() const inAppBrowserPref = useInAppBrowser() const setUseInAppBrowser = useSetInAppBrowser() const optOutOfUtm = useOptOutOfUtm() const setOptOutOfUtm = useSetOptOutOfUtm() return ( Manage saved feeds Thread preferences Following feed preferences External media setAutoplayDisabledPref(!value)}> Autoplay videos and GIFs {isNative && ( setUseInAppBrowser(value)}> Use in-app browser to open links )} {isNative && } {isNative && ( setOptOutOfUtm(!value)}> Send Bluesky referrer )} {isNative && ( Helps external sites estimate traffic from Bluesky. )} ) }