tangled
alpha
login
or
join now
quilling.dev
/
social-app
7
fork
atom
An ATproto social media client -- with an independent Appview.
7
fork
atom
overview
issues
pulls
pipelines
chore: merge from upstream at 2025-09-12-011449
github-actions[bot]
6 months ago
7056b346
b4969698
+30
-25
3 changed files
expand all
collapse all
unified
split
src
components
NewskieDialog.tsx
lib
hooks
useNotificationHandler.ts
state
queries
notifications
unread.tsx
+27
-19
src/components/NewskieDialog.tsx
···
85
85
const isMe = profile.did === currentAccount?.did
86
86
87
87
const profileName = useMemo(() => {
88
88
-
const name = profile.displayName || profile.handle
88
88
+
if (!moderationOpts) return profile.displayName || profile.handle
89
89
+
const moderation = moderateProfile(profile, moderationOpts)
90
90
+
return sanitizeDisplayName(
91
91
+
profile.displayName || profile.handle,
92
92
+
moderation.ui('displayName'),
93
93
+
)
94
94
+
}, [moderationOpts, profile])
95
95
+
96
96
+
const getJoinMessage = () => {
97
97
+
const timeAgoString = timeAgo(createdAt, now, {format: 'long'})
89
98
90
99
if (isMe) {
91
91
-
return _(msg`You`)
100
100
+
if (profile.joinedViaStarterPack) {
101
101
+
return _(
102
102
+
msg`You joined Bluesky using a starter pack ${timeAgoString} ago`,
103
103
+
)
104
104
+
} else {
105
105
+
return _(msg`You joined Bluesky ${timeAgoString} ago`)
106
106
+
}
107
107
+
} else {
108
108
+
if (profile.joinedViaStarterPack) {
109
109
+
return _(
110
110
+
msg`${profileName} joined Bluesky using a starter pack ${timeAgoString} ago`,
111
111
+
)
112
112
+
} else {
113
113
+
return _(msg`${profileName} joined Bluesky ${timeAgoString} ago`)
114
114
+
}
92
115
}
93
93
-
94
94
-
if (!moderationOpts) return name
95
95
-
const moderation = moderateProfile(profile, moderationOpts)
96
96
-
97
97
-
return sanitizeDisplayName(name, moderation.ui('displayName'))
98
98
-
}, [_, isMe, moderationOpts, profile])
116
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
125
-
{profile.joinedViaStarterPack ? (
126
126
-
<Trans>
127
127
-
{profileName} joined Bluesky using a starter pack{' '}
128
128
-
{timeAgo(createdAt, now, {format: 'long'})} ago
129
129
-
</Trans>
130
130
-
) : (
131
131
-
<Trans>
132
132
-
{profileName} joined Bluesky{' '}
133
133
-
{timeAgo(createdAt, now, {format: 'long'})} ago
134
134
-
</Trans>
135
135
-
)}
143
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
389
-
notyLogger.warn('getNotificationPayload: received unknown payload', {
389
389
+
notyLogger.debug('getNotificationPayload: received unknown payload', {
390
390
payload,
391
391
identifier: e.request.identifier,
392
392
})
+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
12
-
import {logger} from '#/logger'
12
12
+
import {useModerationOpts} from '#/state/preferences/moderation-opts'
13
13
+
import {truncateAndInvalidate} from '#/state/queries/util'
13
14
import {useAgent, useSession} from '#/state/session'
14
14
-
import {useModerationOpts} from '../../preferences/moderation-opts'
15
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
192
-
} catch (e) {
193
193
-
logger.warn('Failed to check unread notifications', {error: e})
194
191
} finally {
195
192
isFetchingRef.current = false
196
193
}