From 77439a5799b1da87678288957bd1574701fb4d8f Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 29 Aug 2024 23:12:36 +0530 Subject: [PATCH] fix(common): correctly size spacer to match system bars --- .../msfjarvis/claw/common/comments/CommentsPageImpl.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentsPageImpl.kt b/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentsPageImpl.kt index 85e09e15..208a40d8 100644 --- a/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentsPageImpl.kt +++ b/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentsPageImpl.kt @@ -15,9 +15,11 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.systemBars +import androidx.compose.foundation.layout.windowInsetsBottomHeight import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.MaterialTheme @@ -94,7 +96,9 @@ internal fun CommentsPageInternal( item(key = node.comment.shortId) { Node(node, htmlConverter, openUserProfile) } } - item(key = "bottom_spacer") { Spacer(modifier = Modifier.height(16.dp)) } + item(key = "bottom_spacer") { + Spacer(modifier = Modifier.windowInsetsBottomHeight(WindowInsets.systemBars)) + } } else { item { Text(