Skip to content

Commit

Permalink
Boolti-348 style: 공연 상세 섹션 별 패딩 조정
Browse files Browse the repository at this point in the history
  • Loading branch information
mangbaam committed Nov 30, 2024
1 parent 7bb361a commit 685fed7
Showing 1 changed file with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
Expand Down Expand Up @@ -193,11 +192,6 @@ fun ShowDetailScreen(
)

var buttonsHeight by remember { mutableStateOf(0.dp) }
val bottomPadding by remember {
derivedStateOf {
if (buttonsHeight > 0.dp) buttonsHeight + 56.dp else 0.dp
}
}

LazyColumn(
modifier = Modifier,
Expand Down Expand Up @@ -243,7 +237,7 @@ fun ShowDetailScreen(
)
}

item { Spacer(modifier = Modifier.size(bottomPadding)) }
item { Spacer(modifier = Modifier.size(buttonsHeight)) }
}

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

// 최상단 섹션의 상단 패딩
item { Spacer(Modifier.size(8.dp)) }

// 티켓 판매 섹션
item {
val startDate = showDetail.salesStartDate
val endDate = showDetail.salesEndDateTime.toLocalDate()

Section(
modifier = paddingModifier.padding(top = 8.dp),
modifier = paddingModifier,
title = { SectionTitle(stringResource(id = R.string.ticketing_period)) },
// ex. 2023.12.01 (토) - 2024.01.20 (월)
content = {
Expand Down Expand Up @@ -514,12 +512,13 @@ private fun LazyListScope.ShowInfoTab(

item { Divider(paddingModifier) }

// 일시 섹션
item {
// 일시
// ex. 2024.01.20 (토) / 18:00 (150분)
val minute = stringResource(id = R.string.ticketing_minutes)
Section(
modifier = paddingModifier.padding(top = 8.dp),
modifier = paddingModifier,
title = { SectionTitle(stringResource(id = R.string.ticketing_datetime)) },
content = {
Row {
Expand Down Expand Up @@ -549,7 +548,7 @@ private fun LazyListScope.ShowInfoTab(

item { Divider(paddingModifier) }

// 장소
// 장소 섹션
item {
val snackbarController = LocalSnackbarController.current

Expand Down Expand Up @@ -589,7 +588,7 @@ private fun LazyListScope.ShowInfoTab(
}
item { Divider(paddingModifier) }

// 공연 내용
// 내용 섹션
item {
Section(
modifier = paddingModifier,
Expand All @@ -616,7 +615,7 @@ private fun LazyListScope.ShowInfoTab(
}
item { Divider(paddingModifier) }

// 주최자
// 주최 섹션
item {
Section(
modifier = paddingModifier,
Expand All @@ -629,6 +628,9 @@ private fun LazyListScope.ShowInfoTab(
},
)
}

// 최하단 섹션의 하단 패딩
item { Spacer(Modifier.size(8.dp)) }
}

@OptIn(ExperimentalFoundationApi::class)
Expand Down Expand Up @@ -696,6 +698,7 @@ fun LazyListScope.CastTab(
}
}
)
if (index == teams.lastIndex) Spacer(modifier = Modifier.size(8.dp))
}
}
}
Expand Down

0 comments on commit 685fed7

Please sign in to comment.