Mark Individual Notifications as Read
Each notification list item supports two read-marking interactions: tapping to open the notification detail (which marks it read automatically) and a swipe-to-mark-read gesture for quick dismissal without opening the detail. The notification-read-service records the read timestamp in the backend. The notification tab badge widget recalculates the unread count and updates immediately after a mark-read action. Bulk mark-all-as-read is available via a menu action in the app bar. Read state is synchronised across sessions so that dismissing a notification on one device is reflected on others.
User Story
Acceptance Criteria
- Given an unread notification is tapped, when the notification detail screen opens, then the notification is marked as read in the database and the unread indicator is removed from the list item upon return.
- Given an unread notification is swiped with a mark-read gesture, when the gesture is completed, then the notification is marked read without navigating away, and the visual indicator updates immediately.
- Given one or more notifications are read, when the unread count changes, then the badge on the Notifications tab in the bottom navigation updates within one second.
- Given the peer mentor taps 'Mark all as read' from the app bar menu, when the action completes, then all notification items lose their unread indicator and the tab badge disappears.
- Given the peer mentor marks a notification as read on one device, when they open the notification centre on another device, then that notification is shown as read.
Business Value
An accurate unread badge is a primary driver of notification centre engagement. If the badge count does not decrease after reviewing notifications, peer mentors learn to ignore it entirely, undermining the entire notification system. Reliable read-state management builds trust in the inbox and ensures critical alerts remain visible until genuinely actioned.
Components
- Notification Read State Service service
- Notification List Item ui
- Notification Tab Badge ui
- Notification BLoC service
- Notification Repository data
- Supabase Realtime Subscription Service infrastructure
Dependencies
- View Consolidated Notification Feed critical