forked from
jollywhoppers.com/witchsky.app
fork
Configure Feed
Select the types of activity you want to include in your feed.
Bluesky app fork with some witchin' additions 馃挮
fork
Configure Feed
Select the types of activity you want to include in your feed.
1import {View} from 'react-native'
2import {Trans} from '@lingui/macro'
3
4import {
5 type AllNavigatorParams,
6 type NativeStackScreenProps,
7} from '#/lib/routes/types'
8import {useNotificationSettingsQuery} from '#/state/queries/notifications/settings'
9import {atoms as a} from '#/alf'
10import {Admonition} from '#/components/Admonition'
11import {Shapes_Stroke2_Corner0_Rounded as ShapesIcon} from '#/components/icons/Shapes'
12import * as Layout from '#/components/Layout'
13import * as SettingsList from '../components/SettingsList'
14import {ItemTextWithSubtitle} from './components/ItemTextWithSubtitle'
15import {PreferenceControls} from './components/PreferenceControls'
16
17type Props = NativeStackScreenProps<
18 AllNavigatorParams,
19 'MiscellaneousNotificationSettings'
20>
21export function MiscellaneousNotificationSettingsScreen({}: Props) {
22 const {data: preferences, isError} = useNotificationSettingsQuery()
23
24 return (
25 <Layout.Screen>
26 <Layout.Header.Outer>
27 <Layout.Header.BackButton />
28 <Layout.Header.Content>
29 <Layout.Header.TitleText>
30 <Trans>Notifications</Trans>
31 </Layout.Header.TitleText>
32 </Layout.Header.Content>
33 <Layout.Header.Slot />
34 </Layout.Header.Outer>
35 <Layout.Content>
36 <SettingsList.Container>
37 <SettingsList.Item style={[a.align_start]}>
38 <SettingsList.ItemIcon icon={ShapesIcon} />
39 <ItemTextWithSubtitle
40 bold
41 titleText={<Trans>Everything else</Trans>}
42 subtitleText={
43 <Trans>
44 Notifications for everything else, such as when someone joins
45 via one of your starter packs.
46 </Trans>
47 }
48 />
49 </SettingsList.Item>
50 {isError ? (
51 <View style={[a.px_lg, a.pt_md]}>
52 <Admonition type="error">
53 <Trans>Failed to load notification settings.</Trans>
54 </Admonition>
55 </View>
56 ) : (
57 <PreferenceControls
58 name="starterpackJoined"
59 preference={preferences?.starterpackJoined}
60 syncOthers={['verified', 'unverified']}
61 allowDisableInApp={false}
62 />
63 )}
64 </SettingsList.Container>
65 </Layout.Content>
66 </Layout.Screen>
67 )
68}