deduplicate authors
This commit is contained in:
@@ -6,6 +6,7 @@ import {type AllNavigatorParams} from '#/lib/routes/types'
|
||||
import {PostFeed} from '#/view/com/posts/PostFeed'
|
||||
import {EmptyState} from '#/view/com/util/EmptyState'
|
||||
import * as Layout from '#/components/Layout'
|
||||
import {ListFooter} from '#/components/Lists'
|
||||
|
||||
type Props = NativeStackScreenProps<
|
||||
AllNavigatorParams,
|
||||
@@ -36,6 +37,7 @@ export function NotificationsActivityListScreen({
|
||||
<EmptyState icon="growth" message={_(msg`No posts here`)} />
|
||||
)}
|
||||
disablePoll
|
||||
renderEndOfFeed={() => <ListFooter />}
|
||||
/>
|
||||
</Layout.Screen>
|
||||
)
|
||||
|
||||
@@ -145,7 +145,8 @@ export function groupNotifications(
|
||||
Math.abs(ts2 - ts) < MS_2DAY &&
|
||||
notif.reason === groupedNotif.notification.reason &&
|
||||
notif.reasonSubject === groupedNotif.notification.reasonSubject &&
|
||||
notif.author.did !== groupedNotif.notification.author.did
|
||||
(notif.author.did !== groupedNotif.notification.author.did ||
|
||||
notif.reason === 'subscribed-post')
|
||||
) {
|
||||
const nextIsFollowBack =
|
||||
notif.reason === 'follow' && notif.author.viewer?.following
|
||||
|
||||
@@ -165,7 +165,10 @@ let NotificationFeedItem = ({
|
||||
href: makeProfileLink(author),
|
||||
moderation: moderateProfile(author, moderationOpts),
|
||||
})) || []),
|
||||
]
|
||||
].filter(
|
||||
(author, index, arr) =>
|
||||
arr.findIndex(au => au.profile.did === author.profile.did) === index,
|
||||
)
|
||||
}, [item, moderationOpts])
|
||||
|
||||
const niceTimestamp = niceDate(i18n, item.notification.indexedAt)
|
||||
@@ -659,7 +662,8 @@ let NotificationFeedItem = ({
|
||||
{item.type === 'post-like' ||
|
||||
item.type === 'repost' ||
|
||||
item.type === 'like-via-repost' ||
|
||||
item.type === 'repost-via-repost' ? (
|
||||
item.type === 'repost-via-repost' ||
|
||||
item.type === 'subscribed-post' ? (
|
||||
<View style={[a.pt_2xs]}>
|
||||
<AdditionalPostText post={item.subject} />
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user