diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-30 18:56:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-30 18:56:55 -0800 |
commit | f8c46c08ca92aa1a6d86d1e594fc857171356264 (patch) | |
tree | c6df2089b7a1b6b8a6f597d2cc553871acae2b5f /src/view/com/notifications/Feed.tsx | |
parent | 826cbbd4bf3a9a3cfb87b6dedee630e915b07b27 (diff) | |
download | voidsky-f8c46c08ca92aa1a6d86d1e594fc857171356264.tar.zst |
Improve unread notif tracking (#2056)
Diffstat (limited to 'src/view/com/notifications/Feed.tsx')
-rw-r--r-- | src/view/com/notifications/Feed.tsx | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/view/com/notifications/Feed.tsx b/src/view/com/notifications/Feed.tsx index c496d5f7c..260c9bbd5 100644 --- a/src/view/com/notifications/Feed.tsx +++ b/src/view/com/notifications/Feed.tsx @@ -35,7 +35,7 @@ export function Feed({ const [isPTRing, setIsPTRing] = React.useState(false) const moderationOpts = useModerationOpts() - const {markAllRead, checkUnread} = useUnreadNotificationsApi() + const {checkUnread} = useUnreadNotificationsApi() const { data, isFetching, @@ -47,15 +47,6 @@ export function Feed({ fetchNextPage, } = useNotificationFeedQuery({enabled: !!moderationOpts}) const isEmpty = !isFetching && !data?.pages[0]?.items.length - const firstItem = data?.pages[0]?.items[0] - - // mark all read on fresh data - // (this will fire each time firstItem changes) - React.useEffect(() => { - if (firstItem) { - markAllRead() - } - }, [firstItem, markAllRead]) const items = React.useMemo(() => { let arr: any[] = [] |