mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2025-01-15 22:45:50 +00:00
copy thumbnail URL during crossposting (#2877)
This commit is contained in:
parent
4643983e39
commit
9981ccfd54
3 changed files with 8 additions and 1 deletions
|
@ -206,6 +206,7 @@ export class CreatePost extends Component<
|
|||
altText: locationState.altText,
|
||||
nsfw: locationState.nsfw,
|
||||
languageId: locationState.languageId,
|
||||
customThumbnailUrl: locationState.customThumbnailUrl,
|
||||
});
|
||||
this.setState(s => ({ resetCounter: s.resetCounter + 1 }));
|
||||
}
|
||||
|
|
|
@ -916,7 +916,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
|||
}
|
||||
|
||||
get crossPostParams(): CrossPostParams {
|
||||
const { name, url, alt_text, nsfw, language_id } = this.postView.post;
|
||||
const { name, url, alt_text, nsfw, language_id, thumbnail_url } =
|
||||
this.postView.post;
|
||||
const crossPostParams: CrossPostParams = { name };
|
||||
|
||||
if (url) {
|
||||
|
@ -940,6 +941,10 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
|||
crossPostParams.languageId = language_id;
|
||||
}
|
||||
|
||||
if (thumbnail_url) {
|
||||
crossPostParams.customThumbnailUrl = thumbnail_url;
|
||||
}
|
||||
|
||||
return crossPostParams;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,4 +7,5 @@ export default interface CrossPostParams {
|
|||
altText?: string;
|
||||
nsfw?: StringBoolean;
|
||||
languageId?: number;
|
||||
customThumbnailUrl?: string;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue