diff --git a/src/pages/catchup.css b/src/pages/catchup.css index 2a52e42c..024ea614 100644 --- a/src/pages/catchup.css +++ b/src/pages/catchup.css @@ -626,10 +626,24 @@ gap: 4px; align-items: center; flex-shrink: 0; + min-height: 24px; - .icon { + > .avatar { + outline: 1px solid var(--bg-blur-color); + } + + > .avatar ~ .avatar { + margin-left: -8px; + } + + > .icon { color: var(--reblog-color); } + + > .name-text { + opacity: 0.75; + filter: grayscale(0.75); + } } .post-author { diff --git a/src/pages/catchup.jsx b/src/pages/catchup.jsx index c3f2caa6..d23b422c 100644 --- a/src/pages/catchup.jsx +++ b/src/pages/catchup.jsx @@ -429,9 +429,29 @@ function Catchup() { return postFilterMatches; }); + // Deduplicate boosts + const boostedPosts = {}; + filteredPosts = filteredPosts.filter((post) => { + if (post.reblog) { + if (boostedPosts[post.reblog.id]) { + if (boostedPosts[post.reblog.id].__BOOSTERS) { + boostedPosts[post.reblog.id].__BOOSTERS.add(post.account); + } else { + boostedPosts[post.reblog.id].__BOOSTERS = new Set([post.account]); + } + return false; + } else { + boostedPosts[post.reblog.id] = post; + } + } + return true; + }); + if (selectedAuthor && authorCountsMap.has(selectedAuthor)) { filteredPosts = filteredPosts.filter( - (post) => post.account.id === selectedAuthor, + (post) => + post.account.id === selectedAuthor || + [...(post.__BOOSTERS || [])].find((a) => a.id === selectedAuthor), ); } @@ -1420,6 +1440,7 @@ const PostLine = memo( _followedTags: isFollowedTags, _filtered: filterInfo, visibility, + __BOOSTERS, } = post; const isReplyTo = inReplyToId && inReplyToAccountId !== account.id; const isFiltered = !!filterInfo; @@ -1453,7 +1474,12 @@ const PostLine = memo( {' '} + /> + {__BOOSTERS?.size > 0 + ? [...__BOOSTERS].map((b) => ( + + )) + : ''}{' '} {' '} {/*