diff --git a/src/Navigation.tsx b/src/Navigation.tsx index f1a9c569d0..a779e2b8df 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -111,6 +111,7 @@ import {router} from '#/routes' import {Referrer} from '../modules/expo-bluesky-swiss-army' import {LegacyNotificationSettingsScreen} from './screens/Settings/LegacyNotificationSettings' import {NotificationSettingsScreen} from './screens/Settings/NotificationSettings' +import {ActivityNotificationSettingsScreen} from './screens/Settings/NotificationSettings/ActivityNotificationSettings' import {LikeNotificationSettingsScreen} from './screens/Settings/NotificationSettings/LikeNotificationSettings' import {LikesOnRepostsNotificationSettingsScreen} from './screens/Settings/NotificationSettings/LikesOnRepostsNotificationSettings' import {MentionNotificationSettingsScreen} from './screens/Settings/NotificationSettings/MentionNotificationSettings' @@ -459,6 +460,14 @@ function commonScreens(Stack: typeof Flat, unreadCountLabel?: string) { requireAuth: true, }} /> + ActivityNotificationSettingsScreen} + options={{ + title: title(msg`Activity notifications`), + requireAuth: true, + }} + /> MiscellaneousNotificationSettingsScreen} diff --git a/src/screens/Settings/NotificationSettings/ActivityNotificationSettings.tsx b/src/screens/Settings/NotificationSettings/ActivityNotificationSettings.tsx new file mode 100644 index 0000000000..55a2037cdc --- /dev/null +++ b/src/screens/Settings/NotificationSettings/ActivityNotificationSettings.tsx @@ -0,0 +1,121 @@ +import {useCallback} from 'react' +import {Text, View} from 'react-native' +import {Trans} from '@lingui/macro' + +import { + type AllNavigatorParams, + type NativeStackScreenProps, +} from '#/lib/routes/types' +import {useNotificationSettingsQuery} from '#/state/queries/notifications/settings' +import {List} from '#/view/com/util/List' +import {atoms as a, useTheme} from '#/alf' +import * as Admonition from '#/components/Admonition' +import {Bell_Filled_Corner0_Rounded as BellIcon} from '#/components/icons/Bell' +import {BellRinging_Stroke2_Corner0_Rounded as BellRingingIcon} from '#/components/icons/BellRinging' +import * as Layout from '#/components/Layout' +import {ListFooter} from '#/components/Lists' +import * as SettingsList from '../components/SettingsList' +import {ItemTextWithSubtitle} from './components/ItemTextWithSubtitle' +import {PreferenceControls} from './components/PreferenceControls' + +type Props = NativeStackScreenProps< + AllNavigatorParams, + 'ActivityNotificationSettings' +> +export function ActivityNotificationSettingsScreen({}: Props) { + const t = useTheme() + const {data: preferences, isError} = useNotificationSettingsQuery() + + // TODO: Fetch subscriptions + const items = [] as string[] + + const renderItem = useCallback(() => { + return null + }, []) + + return ( + + + + + + Notifications + + + + + + + + Activity alerts} + subtitleText={ + + Activity Alerts notify you instantly when your favorite + accounts post or reply. + + } + /> + + {isError ? ( + + + Failed to load notification settings. + + + ) : ( + + )} + + } + data={items} + renderItem={renderItem} + ListEmptyComponent={ + + + + + + + + Enable Activity Alerts for an account by visiting their + profile and pressing the{' '} + + bell icon + {' '} + . + + + + + By default, only accounts you follow can receive alerts + from you – this can be changed in{' '} + + Settings → Privacy & Security + + . + + + + + + + } + ListFooterComponent={ + + } + /> + + ) +} diff --git a/src/screens/Settings/NotificationSettings/index.tsx b/src/screens/Settings/NotificationSettings/index.tsx index 800493575d..3af4a68093 100644 --- a/src/screens/Settings/NotificationSettings/index.tsx +++ b/src/screens/Settings/NotificationSettings/index.tsx @@ -16,7 +16,7 @@ import {useNotificationSettingsQuery} from '#/state/queries/notifications/settin import {atoms as a} from '#/alf' import {Admonition} from '#/components/Admonition' import {At_Stroke2_Corner2_Rounded as AtIcon} from '#/components/icons/At' -// import {BellRinging_Stroke2_Corner0_Rounded as BellRingingIcon} from '#/components/icons/BellRinging' +import {BellRinging_Stroke2_Corner0_Rounded as BellRingingIcon} from '#/components/icons/BellRinging' import {Bubble_Stroke2_Corner2_Rounded as BubbleIcon} from '#/components/icons/Bubble' import {Haptic_Stroke2_Corner2_Rounded as HapticIcon} from '#/components/icons/Haptic' import { @@ -183,7 +183,7 @@ export function NotificationSettingsScreen({}: Props) { showSkeleton={!settings} /> - {/* @@ -196,7 +196,7 @@ export function NotificationSettingsScreen({}: Props) { } showSkeleton={!settings} /> - */} +