flarum / issue-archive

0 stars 0 forks source link

Notifications get cleared when panel is open #219

Open therealsujitk opened 4 years ago

therealsujitk commented 4 years ago

Bug Report

Current Behavior As of now, the notification panel gets cleared when it is open and you receive a new notification.

Steps to Reproduce

  1. Go to a Flarum site
  2. Click on the Notification panel (make sure you have notifications)
  3. Send yourself a notification from another account (while the panel is still open)
  4. Notice that all the notifications have been cleared and will only appear when the panel is closed and re-opened.

Expected Behavior It is expected to show the new notification (as well as all the previous notifications) without the panel being closed and re-opened.

Screenshots Before:

Screenshot from 2020-03-20 08-37-56

After:

Screenshot from 2020-03-20 08-53-50

Environment

matteocontrini commented 4 years ago

I think this happens because the notifications cache is brutally wiped when a new notification event is received.

https://github.com/flarum/pusher/blob/0f4955004c16b9ce230307b6539b0e389d9804cd/js/src/forum/index.js#L145

@KyrneDev I've noticed this issue is happening with the WebSocket extension as well. Could you confirm that that part of the code is the same in your extension as well?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum. In any case, thanks for taking an interest in this software and contributing by opening the issue in the first place!

matteocontrini commented 4 years ago

Still an issue.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum. In any case, thanks for taking an interest in this software and contributing by opening the issue in the first place!

matteocontrini commented 3 years ago

Looking at the source code this still seems unfixed.

Could this issue be labelled as a bug?