Skip to content

Commit 5cf6c41

Browse files
committed
Another attempt
1 parent a50dd2d commit 5cf6c41

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/LoadedPaywallComponents.kt

+10-16
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ package com.revenuecat.purchases.ui.revenuecatui.components
44

55
import android.content.res.Configuration
66
import androidx.compose.foundation.layout.Box
7-
import androidx.compose.foundation.layout.Column
8-
import androidx.compose.foundation.layout.Spacer
97
import androidx.compose.foundation.layout.fillMaxSize
108
import androidx.compose.foundation.layout.fillMaxWidth
119
import androidx.compose.foundation.layout.height
10+
import androidx.compose.foundation.layout.padding
1211
import androidx.compose.foundation.rememberScrollState
1312
import androidx.compose.foundation.verticalScroll
1413
import androidx.compose.runtime.Composable
@@ -79,22 +78,17 @@ internal fun LoadedPaywallComponents(
7978
.background(background),
8079
) {
8180
var footerHeight by remember { mutableIntStateOf(0) }
82-
Column(
81+
val footerHeightDp = with(LocalDensity.current) { footerHeight.toDp() }
82+
83+
ComponentView(
84+
style = style,
85+
state = state,
86+
onClick = clickHandler,
8387
modifier = Modifier
8488
.fillMaxSize()
85-
.verticalScroll(rememberScrollState()),
86-
) {
87-
ComponentView(
88-
style = style,
89-
state = state,
90-
onClick = clickHandler,
91-
modifier = Modifier
92-
.fillMaxWidth()
93-
.weight(1f),
94-
)
95-
val footerHeightDp = with(LocalDensity.current) { footerHeight.toDp() }
96-
Spacer(modifier = Modifier.height(footerHeightDp))
97-
}
89+
.verticalScroll(rememberScrollState())
90+
.padding(bottom = footerHeightDp),
91+
)
9892

9993
footerComponentStyle?.let {
10094
ComponentView(

0 commit comments

Comments
 (0)