links-js: calculate header unread count correctly

This commit is contained in:
Liam Fitzgerald 2020-06-19 19:17:01 +10:00
parent 77925b06be
commit 48ae088bbd

View File

@ -55,8 +55,8 @@ export class LinksApp extends Component {
const seen = props.linksSeen ? props.linksSeen : {};
const totalUnseen = _.reduce(
seen,
(acc, links) => acc + _.reduce(links, (total, hasSeen) => total + (hasSeen ? 0 : 1), 0),
links,
(acc, collection) => acc + collection.unseenCount,
0
);