From a446bdd2fe6be731f5aef22850c7572bae6037a9 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 4 Jun 2025 19:58:09 +0300 Subject: [PATCH] rename feature --- .../SubscribeProfileButton.tsx | 6 ++-- .../SubscribeProfileDialog.tsx | 28 +++++++++++++++---- .../Profile/Header/ProfileHeaderStandard.tsx | 2 +- 3 files changed, 26 insertions(+), 10 deletions(-) rename src/components/{post-subscriptions => activity-notifications}/SubscribeProfileButton.tsx (91%) rename src/components/{post-subscriptions => activity-notifications}/SubscribeProfileDialog.tsx (76%) diff --git a/src/components/post-subscriptions/SubscribeProfileButton.tsx b/src/components/activity-notifications/SubscribeProfileButton.tsx similarity index 91% rename from src/components/post-subscriptions/SubscribeProfileButton.tsx rename to src/components/activity-notifications/SubscribeProfileButton.tsx index cfed19a60a..1d4dce9e31 100644 --- a/src/components/post-subscriptions/SubscribeProfileButton.tsx +++ b/src/components/activity-notifications/SubscribeProfileButton.tsx @@ -29,8 +29,8 @@ export function SubscribeProfileButton({ const wrappedOnPress = requireEmailVerification(onPress, { instructions: [ - Before you can subscribe to {name}'s posts, you must first verify your - email. + Before you can get notifications for {name}'s posts, you must first + verify your email. , ], }) @@ -44,7 +44,7 @@ export function SubscribeProfileButton({ color="secondary" variant="solid" shape="round" - label={_(msg`Subscribe to ${name}'s posts`)} + label={_(msg`Get notified when ${name} posts`)} style={[a.justify_center]} onPress={wrappedOnPress}> diff --git a/src/components/post-subscriptions/SubscribeProfileDialog.tsx b/src/components/activity-notifications/SubscribeProfileDialog.tsx similarity index 76% rename from src/components/post-subscriptions/SubscribeProfileDialog.tsx rename to src/components/activity-notifications/SubscribeProfileDialog.tsx index 334d6ace94..8374c22bd6 100644 --- a/src/components/post-subscriptions/SubscribeProfileDialog.tsx +++ b/src/components/activity-notifications/SubscribeProfileDialog.tsx @@ -29,13 +29,18 @@ export function SubscribeProfileDialog({ function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) { const {_} = useLingui() const t = useTheme() - const [state, setState] = useState({posts: false, replies: false}) + const [state, setState] = useState({ + posts: false, + replies: false, + corn: false, + }) const values = useMemo(() => { - const {posts, replies} = state + const {posts, replies, corn} = state const res = [] if (posts) res.push('posts') if (replies) res.push('replies') + if (corn) res.push('corn') return res }, [state]) @@ -43,6 +48,7 @@ function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) { setState({ posts: newValues.includes('posts'), replies: newValues.includes('replies'), + corn: newValues.includes('corn'), }) const name = createSanitizedDisplayName(profile, false) @@ -50,19 +56,19 @@ function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) { return ( + label={_(msg`Get notified of new posts from ${name}`)}> - Subscribe to {name} + Get notified! - Get notifications for account activity + Receive notifications when {name} posts @@ -86,6 +92,16 @@ function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) { + + + Corn facts + + + diff --git a/src/screens/Profile/Header/ProfileHeaderStandard.tsx b/src/screens/Profile/Header/ProfileHeaderStandard.tsx index 18792ec779..91c20acf68 100644 --- a/src/screens/Profile/Header/ProfileHeaderStandard.tsx +++ b/src/screens/Profile/Header/ProfileHeaderStandard.tsx @@ -24,6 +24,7 @@ import {useRequireAuth, useSession} from '#/state/session' import {ProfileMenu} from '#/view/com/profile/ProfileMenu' import * as Toast from '#/view/com/util/Toast' import {atoms as a, platform, useBreakpoints, useTheme} from '#/alf' +import {SubscribeProfileButton} from '#/components/activity-notifications/SubscribeProfileButton' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {useDialogControl} from '#/components/Dialog' import {MessageProfileButton} from '#/components/dms/MessageProfileButton' @@ -32,7 +33,6 @@ import { KnownFollowers, shouldShowKnownFollowers, } from '#/components/KnownFollowers' -import {SubscribeProfileButton} from '#/components/post-subscriptions/SubscribeProfileButton' import * as Prompt from '#/components/Prompt' import {RichText} from '#/components/RichText' import {Text} from '#/components/Typography'