Skip to content

Commit 4ae4f00

Browse files
committed
fix: show correct number of unread posts on project listing page
Explicitly define tags of posts which we count, so even if have some unexpected notification about posts the counter ignores them and still shows the correct number
1 parent 4648784 commit 4ae4f00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/projects/list/components/Projects/ProjectsGridView.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ const ProjectsGridView = props => {
8484
// project notifications
8585
const notReadNotifications = filterReadNotifications(notifications)
8686
const unreadProjectUpdate = filterNotificationsByProjectId(notReadNotifications, item.id)
87-
const unreadPosts = filterTopicAndPostChangedNotifications(unreadProjectUpdate)
87+
// count unread posts for Messages tab and Phases
88+
const unreadPosts = filterTopicAndPostChangedNotifications(unreadProjectUpdate, /^(?:MESSAGES|PRIMARY|phase#\d+)$/)
8889
const unreadPostsCount = unreadPosts.length
8990
const recentlyCreated = moment().diff(item.createdAt, 'seconds') < 3600
9091
return (

0 commit comments

Comments
 (0)