Show collection preview cards and open collections links locally (#38643)
This commit is contained in:
1 parent
a8741495c4
commit
478dae0ab3
11 files changed
+92
-32
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user