Skip to content

Commit

Permalink
Merge pull request #264 from tloncorp/hm/restore-dms
Browse files Browse the repository at this point in the history
notifications: remove filtering of dms
  • Loading branch information
arthyn authored Mar 26, 2024
2 parents 736386b + 5fb784b commit 3d4f226
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions ui/src/nav/notifications/useNotifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,10 @@ export const useNotifications = (mentionsOnly = false) => {
};
}

const notDmsFromGroupsDesk = (s: Skein) =>
!((isDM(s.top.rope) || isClub(s.top.rope)) && isGroups(s.top.rope));

const unreads = skeins
.filter((s) => s.unread)
.filter((s) => notDmsFromGroupsDesk(s));
const filteredSkeins = skeins
.filter((s) => (mentionsOnly ? isMention(s.top) : s))
.filter((s) => notDmsFromGroupsDesk(s));
const unreads = skeins.filter((s) => s.unread);
const filteredSkeins = skeins.filter((s) =>
mentionsOnly ? isMention(s.top) : s
);

return {
notifications: groupSkeinsByDate(filteredSkeins),
Expand Down

0 comments on commit 3d4f226

Please sign in to comment.