Fixup unsafe Composable behaviour
This commit is contained in:
1 parent
2a34d6eb8b
commit
f92ce637bf
1 file changed
+1
-2
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user