From 4293c5a6c3e4be08402d57d5e1f01fc5b70d9c87 Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com> Date: Mon, 17 Jun 2024 23:50:17 +0000 Subject: [PATCH] Fix auto download bug (#2552) --- package.json | 2 +- src/shared/components/post/post-listing.tsx | 20 +++----------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 15bd32b5..5d02a28e 100644 --- a/package.json +++ b/package.json @@ -145,7 +145,7 @@ "sortpack" ] }, - "packageManager": "pnpm@9.4.0", + "packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a", "engineStrict": true, "importSort": { ".js, .jsx, .ts, .tsx": { diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 536dcaf0..1d8b3b0d 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -225,8 +225,8 @@ export class PostListing extends Component { return <>; } - // if direct video link - if (url && isVideo(url)) { + // if direct video link or embedded video link + if (url && (isVideo(url) || post.embed_video_url)) { return (
); } - // if embedded video link - if (url && post.embed_video_url) { - return ( -
- -
- ); - } - if (this.imageSrc) { return ( <>