Skip to content

Commit 291878d

Browse files
committed
fix: reduce padding on mobile screens
1 parent 50a0388 commit 291878d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

composeApp/src/wasmJsMain/kotlin/org/nsh07/nsh07/ui/homeScreen/HomeScreenContent.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import androidx.compose.foundation.clickable
44
import androidx.compose.foundation.layout.*
55
import androidx.compose.foundation.lazy.LazyListScope
66
import androidx.compose.foundation.lazy.items
7+
import androidx.compose.foundation.lazy.itemsIndexed
78
import androidx.compose.material3.*
89
import androidx.compose.material3.MaterialTheme.colorScheme
910
import androidx.compose.material3.MaterialTheme.typography
@@ -92,8 +93,8 @@ fun LazyListScope.mainContent(
9293
wide: Boolean,
9394
topPadding: Dp = 0.dp
9495
) {
95-
items(paragraphs, key = { it.substring(0, 16) }) {
96-
Spacer(Modifier.height(topPadding))
96+
itemsIndexed(paragraphs, key = { _: Int, it: String -> it.take(16) }) { index: Int, it: String ->
97+
if (index == 0) Spacer(Modifier.height(topPadding))
9798
Text(
9899
it,
99100
style = typography.bodyLarge,

0 commit comments

Comments
 (0)