Workaround aspect is NaN, Resolve #1116
This commit is contained in:
1 parent
868ac22c69
commit
98c5ae7490
1 file changed
+2
-1
@@ -129,7 +129,8 @@ fun GalleryInfoGridItem(
|
||||
info: GalleryInfo,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
val aspect = (info.thumbWidth.toFloat() / info.thumbHeight).coerceIn(0.33F, 1.5F)
|
||||
var aspect = (info.thumbWidth.toFloat() / info.thumbHeight).coerceIn(0.33F, 1.5F)
|
||||
if (aspect.isNaN()) aspect = 1F
|
||||
val color = EhUtils.getCategoryColor(info.category)
|
||||
val simpleLang = info.simpleLanguage
|
||||
ElevatedCard(
|
||||
|
||||
Reference in new issue
Block a user