Skip to content

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

@humbkr

Description

@humbkr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions