diff --git a/app/src/main/java/com/hippo/ehviewer/ui/compose/data/GalleryInfo.kt b/app/src/main/java/com/hippo/ehviewer/ui/compose/data/GalleryInfo.kt index 07e7a26aa..4ad0e5d46 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/compose/data/GalleryInfo.kt +++ b/app/src/main/java/com/hippo/ehviewer/ui/compose/data/GalleryInfo.kt @@ -129,8 +129,7 @@ fun GalleryInfoGridItem( info: GalleryInfo, modifier: Modifier = Modifier, ) { - var aspect = (info.thumbWidth.toFloat() / info.thumbHeight).coerceIn(0.33F, 1.5F) - if (aspect.isNaN()) aspect = 1F + val aspect = (info.thumbWidth.toFloat() / info.thumbHeight).coerceIn(0.33F, 1.5F).takeUnless { it.isNaN() } ?: 1F val color = EhUtils.getCategoryColor(info.category) val simpleLang = info.simpleLanguage ElevatedCard(