From 83697ce3fe561e73a2e6e46a9b1caf9199d7a9bb Mon Sep 17 00:00:00 2001 From: Innei Date: Sat, 7 Jun 2025 00:36:14 +0800 Subject: [PATCH] fix(entry-list): ThumbnailImage border radius - Added conditional class handling for ThumbnailImage to manage height based on thumbnail ratio. - Simplified AspectRatioImage structure by removing unnecessary nested View and consolidating Image properties. - Enhanced readability and maintainability of the code. Signed-off-by: Innei --- .../entry-list/templates/EntryNormalItem.tsx | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/apps/mobile/src/modules/entry-list/templates/EntryNormalItem.tsx b/apps/mobile/src/modules/entry-list/templates/EntryNormalItem.tsx index 19fc191dc..eef2efe2c 100644 --- a/apps/mobile/src/modules/entry-list/templates/EntryNormalItem.tsx +++ b/apps/mobile/src/modules/entry-list/templates/EntryNormalItem.tsx @@ -224,8 +224,9 @@ const ThumbnailImage = ({ }, [audio, entry?.title, feed?.title, image, isLoading, isPlaying, video, videoPlayer]) if (!image && !audio && !video) return null + const isSquare = thumbnailRatio === "square" return ( - + {image && (thumbnailRatio === "square" ? ( @@ -317,32 +318,29 @@ const AspectRatioImage = ({ } return ( - - + - - + transition={100} + blurhash={blurhash} + contentFit="cover" + hideOnError + /> ) }