Artemis icon indicating copy to clipboard operation
Artemis copied to clipboard

Notification get marked as read even if they were not loaded

Open MaisiKoleni opened this issue 4 years ago • 2 comments

Describe the bug

Notifications in Artemis are marked as read by opening the sidebar and waiting a bit. However, the notifications are not refreshed when the sidebar is opened.

Details

Given you know that you a group notification was generated:

  1. The Notification Icon does not show that there is a new notification
  2. You open the sidebar
  3. Still no notification visible
  4. You reload
  5. The Notification Icon still does not show that there is a new notification
  6. You open the sidebar again
  7. There is the new notification, but it is not displayed as new.

But given the same situation:

  1. The Notification Icon does not show that there is a new notification
  2. You do not open the sidebar
  3. You reload
  4. The Notification Icon does show that there is a new notification
  5. You open the sidebar again
  6. There is the new notification and it is displayed as new.

Solution

We should only mark notifications as read if they actually got read, meaning they got displayed. The client should send the IDs of the read notifications, not just use the current time because it will never be guaranteed that all notifications have been sent to the client at that time (e.g. connection could break temporarily).

Improvement

It would be a good intermediate solution to load new notifications when opening the sidebar and only start marking them as read if this operation was successful.

MaisiKoleni avatar Jan 14 '21 21:01 MaisiKoleni

Our current database structure does not allow to store for each user when a particular notification was read, therefore we have a limited functionality with the last timestamp a user has accessed the notifications.

We could extend this, but this would take quite some time as the database structure would need to be adapted.

krusche avatar Jan 14 '21 22:01 krusche

Ok, then we should at least make sure that all new notifications up to a certain time are loaded and displayed before making them as read.

MaisiKoleni avatar Jan 15 '21 08:01 MaisiKoleni