Show collection preview cards and open collections links locally (#38643)

This commit is contained in:
diondiondion authored and GitHub committed 2026-04-23 09:16:54 +00:00
1 parent a8741495c4
commit 478dae0ab3
11 files changed
+92 -32

No files matched your search

+17 -7
View File
@@ -547,13 +547,23 @@ class Status extends ImmutablePureComponent {
);
}
} else if (status.get('card') && !status.get('quote')) {
media = (
<Card
key={`${status.get('id')}-${status.get('edited_at')}`}
card={status.get('card')}
sensitive={status.get('sensitive')}
/>
);
const cardUrl = status.getIn(['card', 'url']);
const taggedCollection = (
status.get('tagged_collections')
).find((item) => compareUrls(item.get('url'), cardUrl));
if (taggedCollection) {
media = <CollectionPreviewCard collection={taggedCollection} />;
} else {
media = (
<Card
key={`${status.get('id')}-${status.get('edited_at')}`}
card={status.get('card')}
sensitive={status.get('sensitive')}
/>
);
}
}
const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status);