diff options
author | Eric Bailey <git@esb.lol> | 2024-08-08 11:48:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-08 11:48:24 -0500 |
commit | f3a9f874d96d8cf4e1705c8c9086949bd59b25c0 (patch) | |
tree | b40aa30a8d7dd6a2c6dca66db0b09e6eb222d6d0 /src/state/queries/notifications/util.ts | |
parent | 4b71950d9920913a2a2cc9e493b23b87aad7cec1 (diff) | |
download | voidsky-f3a9f874d96d8cf4e1705c8c9086949bd59b25c0.tar.zst |
Remove ungroup_follow_backs gate (#4893)
Diffstat (limited to 'src/state/queries/notifications/util.ts')
-rw-r--r-- | src/state/queries/notifications/util.ts | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/state/queries/notifications/util.ts b/src/state/queries/notifications/util.ts index 7651e414a..e0ee02294 100644 --- a/src/state/queries/notifications/util.ts +++ b/src/state/queries/notifications/util.ts @@ -30,7 +30,6 @@ export async function fetchPage({ queryClient, moderationOpts, fetchAdditionalData, - shouldUngroupFollowBacks, }: { agent: BskyAgent cursor: string | undefined @@ -38,7 +37,6 @@ export async function fetchPage({ queryClient: QueryClient moderationOpts: ModerationOpts | undefined fetchAdditionalData: boolean - shouldUngroupFollowBacks?: () => boolean priority?: boolean }): Promise<{ page: FeedPage @@ -58,7 +56,7 @@ export async function fetchPage({ ) // group notifications which are essentially similar (follows, likes on a post) - let notifsGrouped = groupNotifications(notifs, {shouldUngroupFollowBacks}) + let notifsGrouped = groupNotifications(notifs) // we fetch subjects of notifications (usually posts) now instead of lazily // in the UI to avoid relayouts @@ -117,7 +115,6 @@ export function shouldFilterNotif( export function groupNotifications( notifs: AppBskyNotificationListNotifications.Notification[], - options?: {shouldUngroupFollowBacks?: () => boolean}, ): FeedNotification[] { const groupedNotifs: FeedNotification[] = [] for (const notif of notifs) { @@ -137,9 +134,7 @@ export function groupNotifications( const prevIsFollowBack = groupedNotif.notification.reason === 'follow' && groupedNotif.notification.author.viewer?.following - const shouldUngroup = - (nextIsFollowBack || prevIsFollowBack) && - options?.shouldUngroupFollowBacks?.() + const shouldUngroup = nextIsFollowBack || prevIsFollowBack if (!shouldUngroup) { groupedNotif.additional = groupedNotif.additional || [] groupedNotif.additional.push(notif) |