diff options
Diffstat (limited to 'src/view/com/notifications/NotificationFeedItem.tsx')
-rw-r--r-- | src/view/com/notifications/NotificationFeedItem.tsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/view/com/notifications/NotificationFeedItem.tsx b/src/view/com/notifications/NotificationFeedItem.tsx index 4902e66bc..1267ce089 100644 --- a/src/view/com/notifications/NotificationFeedItem.tsx +++ b/src/view/com/notifications/NotificationFeedItem.tsx @@ -79,10 +79,12 @@ interface Author { let NotificationFeedItem = ({ item, moderationOpts, + highlightUnread, hideTopBorder, }: { item: FeedNotification moderationOpts: ModerationOpts + highlightUnread: boolean hideTopBorder?: boolean }): React.ReactNode => { const queryClient = useQueryClient() @@ -151,6 +153,7 @@ let NotificationFeedItem = ({ if (!item.subject) { return null } + const isHighlighted = highlightUnread && !item.notification.isRead return ( <Link testID={`feedItem-by-${item.notification.author.handle}`} @@ -160,12 +163,10 @@ let NotificationFeedItem = ({ <Post post={item.subject} style={ - item.notification.isRead - ? undefined - : { - backgroundColor: pal.colors.unreadNotifBg, - borderColor: pal.colors.unreadNotifBorder, - } + isHighlighted && { + backgroundColor: pal.colors.unreadNotifBg, + borderColor: pal.colors.unreadNotifBorder, + } } hideTopBorder={hideTopBorder} /> |