Skip to content

Commit 685fed7

Browse files
committed
Boolti-348 style: 공연 상세 섹션 별 패딩 조정
1 parent 7bb361a commit 685fed7

File tree

1 file changed

+15
-12
lines changed
  • presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail

1 file changed

+15
-12
lines changed

presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt

+15-12
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ import androidx.compose.material3.Text
4747
import androidx.compose.runtime.Composable
4848
import androidx.compose.runtime.CompositionLocalProvider
4949
import androidx.compose.runtime.LaunchedEffect
50-
import androidx.compose.runtime.derivedStateOf
5150
import androidx.compose.runtime.getValue
5251
import androidx.compose.runtime.mutableStateOf
5352
import androidx.compose.runtime.remember
@@ -193,11 +192,6 @@ fun ShowDetailScreen(
193192
)
194193

195194
var buttonsHeight by remember { mutableStateOf(0.dp) }
196-
val bottomPadding by remember {
197-
derivedStateOf {
198-
if (buttonsHeight > 0.dp) buttonsHeight + 56.dp else 0.dp
199-
}
200-
}
201195

202196
LazyColumn(
203197
modifier = Modifier,
@@ -243,7 +237,7 @@ fun ShowDetailScreen(
243237
)
244238
}
245239

246-
item { Spacer(modifier = Modifier.size(bottomPadding)) }
240+
item { Spacer(modifier = Modifier.size(buttonsHeight)) }
247241
}
248242

249243
val onTicketClicked: (TicketBottomSheetType) -> Unit = { type ->
@@ -472,12 +466,16 @@ private fun LazyListScope.ShowInfoTab(
472466
) {
473467
val paddingModifier = Modifier.padding(horizontal = marginHorizontal)
474468

469+
// 최상단 섹션의 상단 패딩
470+
item { Spacer(Modifier.size(8.dp)) }
471+
472+
// 티켓 판매 섹션
475473
item {
476474
val startDate = showDetail.salesStartDate
477475
val endDate = showDetail.salesEndDateTime.toLocalDate()
478476

479477
Section(
480-
modifier = paddingModifier.padding(top = 8.dp),
478+
modifier = paddingModifier,
481479
title = { SectionTitle(stringResource(id = R.string.ticketing_period)) },
482480
// ex. 2023.12.01 (토) - 2024.01.20 (월)
483481
content = {
@@ -514,12 +512,13 @@ private fun LazyListScope.ShowInfoTab(
514512

515513
item { Divider(paddingModifier) }
516514

515+
// 일시 섹션
517516
item {
518517
// 일시
519518
// ex. 2024.01.20 (토) / 18:00 (150분)
520519
val minute = stringResource(id = R.string.ticketing_minutes)
521520
Section(
522-
modifier = paddingModifier.padding(top = 8.dp),
521+
modifier = paddingModifier,
523522
title = { SectionTitle(stringResource(id = R.string.ticketing_datetime)) },
524523
content = {
525524
Row {
@@ -549,7 +548,7 @@ private fun LazyListScope.ShowInfoTab(
549548

550549
item { Divider(paddingModifier) }
551550

552-
// 장소
551+
// 장소 섹션
553552
item {
554553
val snackbarController = LocalSnackbarController.current
555554

@@ -589,7 +588,7 @@ private fun LazyListScope.ShowInfoTab(
589588
}
590589
item { Divider(paddingModifier) }
591590

592-
// 공연 내용
591+
// 내용 섹션
593592
item {
594593
Section(
595594
modifier = paddingModifier,
@@ -616,7 +615,7 @@ private fun LazyListScope.ShowInfoTab(
616615
}
617616
item { Divider(paddingModifier) }
618617

619-
// 주최자
618+
// 주최 섹션
620619
item {
621620
Section(
622621
modifier = paddingModifier,
@@ -629,6 +628,9 @@ private fun LazyListScope.ShowInfoTab(
629628
},
630629
)
631630
}
631+
632+
// 최하단 섹션의 하단 패딩
633+
item { Spacer(Modifier.size(8.dp)) }
632634
}
633635

634636
@OptIn(ExperimentalFoundationApi::class)
@@ -696,6 +698,7 @@ fun LazyListScope.CastTab(
696698
}
697699
}
698700
)
701+
if (index == teams.lastIndex) Spacer(modifier = Modifier.size(8.dp))
699702
}
700703
}
701704
}

0 commit comments

Comments
 (0)