If the action is undone (unlike/delete comment):
- Before the user sees it, the notification should be removed.
- After the user sees it, keep the notification, but show a fallback e.g This comment was deleted
This way, notification is treated as state rather than events.
When a user likes or comments on a post, notification is sent.
What happens if the user deletes the comment or unlike the post?
>>If the notification has not been viewed
Should the notification get deleted as well?
>>If the notification has been viewed
Should the notification still be deleted?
What is the best way to handle notifications in these two scenarios?