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