Skip to content

Conversation

@xsahil03x
Copy link
Member

This commit introduces a notification feed to the sample app and implements the ability to mark notifications as read or seen.

This commit introduces a notification feed to the sample app and implements the ability to mark notifications as read or seen.

Key changes:

- **Notification Feed UI:**
    - Added `NotificationFeed` widget to display a list of aggregated notifications.
    - Added `NotificationItem` widget to render individual notification items with icons, text, and an unread indicator.
    - Integrated the notification feed into the `UserFeedScreen` accessible via a new notification icon in the app bar, which displays a badge for unseen notifications.
    - Notifications can be marked as read by tapping on them or by using a "Mark all read" button.
    - Notifications are automatically marked as seen when the notification feed is opened.
- **Mark Activity Logic:**
    - Implemented `onActivityMarked` in `FeedNotifier` to update the `FeedState` when activities are marked as read or seen.
    - Added helper methods (`_markAllRead`, `_markAllSeen`, `_markRead`, `_markSeen`) in `FeedNotifier` to handle different marking scenarios and update `NotificationStatusResponse`.
    - Introduced `MarkActivityDataHandler` extension on `MarkActivityData` to simplify handling different mark operations.
- **Styling and Refinements:**
    - Refactored `ActionButton` to always display the count and use `TextButton.icon`. Removed the `showCountWhenZero` property.
    - Updated `AppTextTheme` for `bodyBold` to use `FontWeight.w500`.
    - Used `switch` expressions for icon selection in `ActivityContent` and `NotificationItem`.
- **Exports:** Added `AggregatedActivityData`, `FeedMemberData`, and `FollowData` to `models.dart`.
- **Feed Repository:** Ensured `aggregatedActivities` in `GetOrCreateFeedData` are sorted.
@xsahil03x xsahil03x requested a review from a team as a code owner September 8, 2025 11:59
@xsahil03x xsahil03x merged commit 04dad55 into main Sep 9, 2025
3 of 6 checks passed
@xsahil03x xsahil03x deleted the feat/sample-app-notification-feed branch September 9, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants