Bluesky app fork with some witchin' additions 💫

Merge branch 'main' of https://github.com/bluesky-social/social-app

+63 -54
+27 -19
src/components/NewskieDialog.tsx
··· 85 85 const isMe = profile.did === currentAccount?.did 86 86 87 87 const profileName = useMemo(() => { 88 - const name = profile.displayName || profile.handle 88 + if (!moderationOpts) return profile.displayName || profile.handle 89 + const moderation = moderateProfile(profile, moderationOpts) 90 + return sanitizeDisplayName( 91 + profile.displayName || profile.handle, 92 + moderation.ui('displayName'), 93 + ) 94 + }, [moderationOpts, profile]) 95 + 96 + const getJoinMessage = () => { 97 + const timeAgoString = timeAgo(createdAt, now, {format: 'long'}) 89 98 90 99 if (isMe) { 91 - return _(msg`You`) 100 + if (profile.joinedViaStarterPack) { 101 + return _( 102 + msg`You joined Bluesky using a starter pack ${timeAgoString} ago`, 103 + ) 104 + } else { 105 + return _(msg`You joined Bluesky ${timeAgoString} ago`) 106 + } 107 + } else { 108 + if (profile.joinedViaStarterPack) { 109 + return _( 110 + msg`${profileName} joined Bluesky using a starter pack ${timeAgoString} ago`, 111 + ) 112 + } else { 113 + return _(msg`${profileName} joined Bluesky ${timeAgoString} ago`) 114 + } 92 115 } 93 - 94 - if (!moderationOpts) return name 95 - const moderation = moderateProfile(profile, moderationOpts) 96 - 97 - return sanitizeDisplayName(name, moderation.ui('displayName')) 98 - }, [_, isMe, moderationOpts, profile]) 116 + } 99 117 100 118 return ( 101 119 <Dialog.ScrollableInner ··· 122 140 </Text> 123 141 </View> 124 142 <Text style={[a.text_md, a.text_center, a.leading_snug]}> 125 - {profile.joinedViaStarterPack ? ( 126 - <Trans> 127 - {profileName} joined Bluesky using a starter pack{' '} 128 - {timeAgo(createdAt, now, {format: 'long'})} ago 129 - </Trans> 130 - ) : ( 131 - <Trans> 132 - {profileName} joined Bluesky{' '} 133 - {timeAgo(createdAt, now, {format: 'long'})} ago 134 - </Trans> 135 - )} 143 + {getJoinMessage()} 136 144 </Text> 137 145 {profile.joinedViaStarterPack ? ( 138 146 <StarterPackCard.Link
+1 -1
src/lib/hooks/useNotificationHandler.ts
··· 386 386 return payload 387 387 } else { 388 388 if (payload) { 389 - notyLogger.warn('getNotificationPayload: received unknown payload', { 389 + notyLogger.debug('getNotificationPayload: received unknown payload', { 390 390 payload, 391 391 identifier: e.request.identifier, 392 392 })
+33 -29
src/locale/locales/en/messages.po
··· 422 422 msgid "{notificationCount, plural, one {# unread item} other {# unread items}}" 423 423 msgstr "" 424 424 425 - #: src/components/NewskieDialog.tsx:131 426 - msgid "{profileName} joined Bluesky {0} ago" 425 + #: src/components/NewskieDialog.tsx:113 426 + msgid "{profileName} joined Bluesky {timeAgoString} ago" 427 427 msgstr "" 428 428 429 - #: src/components/NewskieDialog.tsx:126 430 - msgid "{profileName} joined Bluesky using a starter pack {0} ago" 429 + #: src/components/NewskieDialog.tsx:110 430 + msgid "{profileName} joined Bluesky using a starter pack {timeAgoString} ago" 431 431 msgstr "" 432 432 433 433 #. The trending topic rank, i.e. "1. March Madness", "2. The Bachelor" ··· 1150 1150 msgid "Appeal submitted" 1151 1151 msgstr "" 1152 1152 1153 - #: src/screens/Takendown.tsx:111 1154 - #: src/screens/Takendown.tsx:144 1153 + #: src/screens/Takendown.tsx:120 1154 + #: src/screens/Takendown.tsx:153 1155 1155 msgid "Appeal suspension" 1156 1156 msgstr "" 1157 1157 1158 - #: src/screens/Takendown.tsx:114 1158 + #: src/screens/Takendown.tsx:123 1159 1159 msgid "Appeal Suspension" 1160 1160 msgstr "" 1161 1161 ··· 1465 1465 msgid "Bluesky is better with friends!" 1466 1466 msgstr "" 1467 1467 1468 - #: src/screens/Takendown.tsx:217 1468 + #: src/screens/Takendown.tsx:226 1469 1469 msgid "Bluesky Social Terms of Service" 1470 1470 msgstr "" 1471 1471 ··· 1621 1621 #: src/screens/Settings/components/ChangePasswordDialog.tsx:246 1622 1622 #: src/screens/Settings/components/ChangePasswordDialog.tsx:252 1623 1623 #: src/screens/Settings/Settings.tsx:289 1624 - #: src/screens/Takendown.tsx:99 1625 - #: src/screens/Takendown.tsx:102 1624 + #: src/screens/Takendown.tsx:108 1625 + #: src/screens/Takendown.tsx:111 1626 1626 #: src/view/com/composer/Composer.tsx:1005 1627 1627 #: src/view/com/composer/Composer.tsx:1016 1628 1628 #: src/view/com/composer/photos/EditImageDialog.web.tsx:43 ··· 1930 1930 #: src/components/dms/ReportDialog.tsx:395 1931 1931 #: src/components/live/EditLiveDialog.tsx:229 1932 1932 #: src/components/live/EditLiveDialog.tsx:235 1933 - #: src/components/NewskieDialog.tsx:159 1934 - #: src/components/NewskieDialog.tsx:165 1933 + #: src/components/NewskieDialog.tsx:167 1934 + #: src/components/NewskieDialog.tsx:173 1935 1935 #: src/components/Post/Embed/ExternalEmbed/Gif.tsx:197 1936 1936 #: src/components/ProgressGuide/FollowDialog.tsx:379 1937 1937 #: src/components/StarterPack/Wizard/WizardEditListDialog.tsx:118 ··· 5577 5577 msgid "New starter pack" 5578 5578 msgstr "" 5579 5579 5580 - #: src/components/NewskieDialog.tsx:102 5580 + #: src/components/NewskieDialog.tsx:120 5581 5581 msgid "New user info dialog" 5582 5582 msgstr "" 5583 5583 ··· 6864 6864 msgid "Real people." 6865 6865 msgstr "" 6866 6866 6867 - #: src/screens/Takendown.tsx:162 6868 - #: src/screens/Takendown.tsx:170 6867 + #: src/screens/Takendown.tsx:171 6868 + #: src/screens/Takendown.tsx:179 6869 6869 msgid "Reason for appeal" 6870 6870 msgstr "" 6871 6871 ··· 7512 7512 msgstr "" 7513 7513 7514 7514 #: src/components/dms/ChatEmptyPill.tsx:33 7515 - #: src/components/NewskieDialog.tsx:121 7515 + #: src/components/NewskieDialog.tsx:139 7516 7516 #: src/view/com/notifications/NotificationFeedItem.tsx:751 7517 7517 #: src/view/com/notifications/NotificationFeedItem.tsx:776 7518 7518 msgid "Say hello!" ··· 8219 8219 #: src/screens/Settings/Settings.tsx:288 8220 8220 #: src/screens/SignupQueued.tsx:93 8221 8221 #: src/screens/SignupQueued.tsx:96 8222 - #: src/screens/Takendown.tsx:85 8222 + #: src/screens/Takendown.tsx:94 8223 8223 #: src/view/shell/desktop/LeftNav.tsx:212 8224 8224 #: src/view/shell/desktop/LeftNav.tsx:269 8225 8225 #: src/view/shell/desktop/LeftNav.tsx:272 8226 8226 msgid "Sign out" 8227 8227 msgstr "" 8228 8228 8229 - #: src/screens/Takendown.tsx:88 8229 + #: src/screens/Takendown.tsx:97 8230 8230 msgid "Sign Out" 8231 8231 msgstr "" 8232 8232 ··· 8462 8462 msgid "Submit" 8463 8463 msgstr "" 8464 8464 8465 - #: src/screens/Takendown.tsx:70 8465 + #: src/screens/Takendown.tsx:79 8466 8466 msgid "Submit appeal" 8467 8467 msgstr "" 8468 8468 8469 - #: src/screens/Takendown.tsx:76 8469 + #: src/screens/Takendown.tsx:85 8470 8470 msgid "Submit Appeal" 8471 8471 msgstr "" 8472 8472 ··· 10221 10221 msgid "Welcome back!" 10222 10222 msgstr "" 10223 10223 10224 - #: src/components/NewskieDialog.tsx:121 10224 + #: src/components/NewskieDialog.tsx:139 10225 10225 msgid "Welcome, friend!" 10226 10226 msgstr "" 10227 10227 ··· 10270 10270 msgid "Whoops! Trending videos failed to load." 10271 10271 msgstr "" 10272 10272 10273 - #: src/screens/Takendown.tsx:173 10273 + #: src/screens/Takendown.tsx:182 10274 10274 msgid "Why are you appealing?" 10275 10275 msgstr "" 10276 10276 ··· 10363 10363 10364 10364 #: src/components/dms/DateDivider.tsx:46 10365 10365 msgid "Yesterday" 10366 - msgstr "" 10367 - 10368 - #: src/components/NewskieDialog.tsx:91 10369 - msgid "You" 10370 10366 msgstr "" 10371 10367 10372 10368 #: src/screens/Signup/StepInfo/Policies.tsx:23 ··· 10598 10594 msgid "You initiated this flow already, {0} ago. It may take up to 5 minutes for emails to reach your inbox. Please consider waiting a few minutes before trying again." 10599 10595 msgstr "" 10600 10596 10597 + #: src/components/NewskieDialog.tsx:105 10598 + msgid "You joined Bluesky {timeAgoString} ago" 10599 + msgstr "" 10600 + 10601 + #: src/components/NewskieDialog.tsx:102 10602 + msgid "You joined Bluesky using a starter pack {timeAgoString} ago" 10603 + msgstr "" 10604 + 10601 10605 #: src/components/moderation/LabelsOnMeDialog.tsx:79 10602 10606 msgid "You may appeal non-self labels if you feel they were placed in error." 10603 10607 msgstr "" ··· 10786 10790 msgid "Your account has been deleted" 10787 10791 msgstr "" 10788 10792 10789 - #: src/screens/Takendown.tsx:146 10793 + #: src/screens/Takendown.tsx:155 10790 10794 msgid "Your account has been suspended" 10791 10795 msgstr "" 10792 10796 ··· 10798 10802 msgid "Your account repository, containing all public data records, can be downloaded as a \"CAR\" file. This file does not include media embeds, such as images, or your private data, which must be fetched separately." 10799 10803 msgstr "" 10800 10804 10801 - #: src/screens/Takendown.tsx:214 10805 + #: src/screens/Takendown.tsx:223 10802 10806 msgid "Your account was found to be in violation of the <0>Bluesky Social Terms of Service</0>. You have been sent an email outlining the specific violation and suspension period, if applicable. You can appeal this decision if you believe it was made in error." 10803 10807 msgstr "" 10804 10808 10805 - #: src/screens/Takendown.tsx:154 10809 + #: src/screens/Takendown.tsx:163 10806 10810 msgid "Your appeal has been submitted. If your appeal succeeds, you will receive an email." 10807 10811 msgstr "" 10808 10812
+2 -5
src/state/queries/notifications/unread.tsx
··· 9 9 10 10 import BroadcastChannel from '#/lib/broadcast' 11 11 import {resetBadgeCount} from '#/lib/notifications/notifications' 12 - import {logger} from '#/logger' 12 + import {useModerationOpts} from '#/state/preferences/moderation-opts' 13 + import {truncateAndInvalidate} from '#/state/queries/util' 13 14 import {useAgent, useSession} from '#/state/session' 14 - import {useModerationOpts} from '../../preferences/moderation-opts' 15 - import {truncateAndInvalidate} from '../util' 16 15 import {RQKEY as RQKEY_NOTIFS} from './feed' 17 16 import {type CachedFeedPage, type FeedPage} from './types' 18 17 import {fetchPage} from './util' ··· 189 188 truncateAndInvalidate(queryClient, RQKEY_NOTIFS('mentions')) 190 189 } 191 190 broadcast.postMessage({event: unreadCountStr}) 192 - } catch (e) { 193 - logger.warn('Failed to check unread notifications', {error: e}) 194 191 } finally { 195 192 isFetchingRef.current = false 196 193 }