From 9ee1bbb429d4d993f756fd618215386d02e741eb Mon Sep 17 00:00:00 2001 From: lisonge Date: Sun, 8 Sep 2024 00:51:07 +0800 Subject: [PATCH] fix: itemPadding --- .../main/kotlin/li/songe/gkd/ui/component/TextSwitch.kt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/src/main/kotlin/li/songe/gkd/ui/component/TextSwitch.kt b/app/src/main/kotlin/li/songe/gkd/ui/component/TextSwitch.kt index c06337b..145b29f 100644 --- a/app/src/main/kotlin/li/songe/gkd/ui/component/TextSwitch.kt +++ b/app/src/main/kotlin/li/songe/gkd/ui/component/TextSwitch.kt @@ -28,13 +28,7 @@ fun TextSwitch( onCheckedChange: ((Boolean) -> Unit)? = null, ) { Row( - modifier = modifier.let { - if (modifier == Modifier) { - it.itemPadding() - } else { - it.then(modifier) - } - }, + modifier = modifier.itemPadding(), verticalAlignment = Alignment.CenterVertically ) { Column(modifier = Modifier.weight(1f)) {