Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,14 @@ Recap: Mastodon v4.3 features (https://github.com/mastodon/mastodon/releases/tag
- 📱 Haptics
- 🐛 Bug fixes

## June 22, 2026

📢 https://mastodon.social/@cheeaun/116793733342092207

- 🗂️ Collections (Mastodon v4.6)
- 🤖 Filter notifications from bots (Mastodon v4.6)
- 🐛 Bug fixes

<!--
## Next
Expand Down
43 changes: 29 additions & 14 deletions src/components/status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ import TranslationBlock from './translation-block';

const SHOW_COMMENT_COUNT_LIMIT = 280;
const INLINE_TRANSLATE_LIMIT = 140;
const MAX_COLLECTIONS = 4;

const accountQueue = new PQueue({
concurrency: 1,
Expand Down Expand Up @@ -2066,9 +2067,18 @@ function Status({
? forceShowQuoteCount(quotesCount)
: forceShowQuoteCount && quotesCount > 0;

const collectionForCard = taggedCollections?.find((c) => {
return isSameURL(c.url, card?.url);
});
const collectionsWithCard = useMemo(() => {
const tc = taggedCollections ?? [];
const cardUrl = card?.url;
const matchIndex = tc.findIndex((c) => isSameURL(c.url, cardUrl));

if (matchIndex === -1) return [];

const matched = tc[matchIndex];
const others = tc.filter((_, i) => i !== matchIndex);

return [matched, ...others].slice(0, MAX_COLLECTIONS);
}, [taggedCollections, card?.url]);

return (
<StatusParent>
Expand Down Expand Up @@ -2766,17 +2776,22 @@ function Status({
{!poll &&
!mediaAttachments.length &&
!snapStates.statusQuotes[sKey] &&
(collectionForCard ? (
<CollectionCard
collection={collectionForCard}
instance={currentInstance}
creatorAccount={
collectionForCard.accountId === accountId
? status.account
: undefined
}
size={size}
/>
(collectionsWithCard.length ? (
<div class="collections-container">
{collectionsWithCard.map((collection) => (
<CollectionCard
key={collection.id}
collection={collection}
instance={currentInstance}
creatorAccount={
collection.accountId === accountId
? status.account
: undefined
}
size={size}
/>
))}
</div>
) : !!card && /^https/i.test(card?.url) ? (
<StatusCard
card={card}
Expand Down
Loading
Loading