Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: NotificationDropdown feed marks notifications as seen at first load #366

Open
humbkr opened this issue Sep 12, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@humbkr
Copy link

humbkr commented Sep 12, 2022

Describe the bug

When the NotificationDropdown components loads, after the first API call to fetch the feed, a second "refresh" one with mark_seen: true is instantly made without any user interaction, so all the notifications are marked as read and the new notifications badge is never displayed.

To Reproduce

  • send new unseen notifications to the feed
  • open a page using the NotificationDropdown component

=> no badge is displayed, the notifications are marked as seen on getStream without the user having actually seen them.

The bug seems to have been introduced in version 1.3.4 by this PR: #313

Before, the refresh was made from src/components/NotificationFeed.tsx and thus was triggered only when the user opened the feed, but now the refresh is made from src/context/Feed.tsx and is triggered way too soon.

Expected behavior

New notifications should not be marked as seen before the user opens the notifications feed.

@humbkr humbkr added the bug Something isn't working label Sep 12, 2022
@ohitsdoh
Copy link

ohitsdoh commented Oct 31, 2022

a workaround that seems to work for me is to set mark_seen as false, then to set the Group prop in <NotificationDropdown /> to a custom component that uses onMarkAsSeen from useFeedContext to set activity groups that haven't been seen yet as seen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants