import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import { type CommonNavigatorParams, type NativeStackScreenProps, } from '#/lib/routes/types' import { normalizeSort, normalizeView, useThreadPreferences, } from '#/state/queries/preferences/useThreadPreferences' import {atoms as a, useTheme} from '#/alf' import * as Toggle from '#/components/forms/Toggle' import {Bubbles_Stroke2_Corner2_Rounded as BubblesIcon} from '#/components/icons/Bubble' import {PersonGroup_Stroke2_Corner2_Rounded as PersonGroupIcon} from '#/components/icons/Person' import {Tree_Stroke2_Corner0_Rounded as TreeIcon} from '#/components/icons/Tree' import * as Layout from '#/components/Layout' import {Text} from '#/components/Typography' import * as SettingsList from './components/SettingsList' type Props = NativeStackScreenProps export function ThreadPreferencesScreen({}: Props) { const t = useTheme() const {_} = useLingui() const { sort, setSort, view, setView, prioritizeFollowedUsers, setPrioritizeFollowedUsers, } = useThreadPreferences({save: true}) return ( Thread Preferences Sort replies Sort replies to the same post by: setSort(normalizeSort(values[0]))}> Top replies first Oldest replies first Newest replies first Prioritize your Follows setPrioritizeFollowedUsers(value)} style={[a.w_full, a.gap_md]}> Show replies by people you follow before all other replies Tree view setView(normalizeView({treeViewEnabled: value})) } style={[a.w_full, a.gap_md]}> Show post replies in a threaded tree view ) }