Skip to content

Commit

Permalink
Merge pull request #327 from Nexters/feature/Boolti-325
Browse files Browse the repository at this point in the history
Boolti-325 style: 공연 상세 출연진 목록 오버 스크롤 애니메이션 제거
  • Loading branch information
mangbaam authored Nov 8, 2024
2 parents e1f6e91 + 475e4f1 commit f9bc737
Showing 1 changed file with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package com.nexters.boolti.presentation.screen.showdetail
import android.content.Intent
import android.os.Build
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.LocalOverscrollConfiguration
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
Expand Down Expand Up @@ -37,6 +39,7 @@ import androidx.compose.material3.TabRowDefaults
import androidx.compose.material3.TabRowDefaults.tabIndicatorOffset
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
Expand Down Expand Up @@ -512,6 +515,7 @@ private fun LazyListScope.ShowInfoTab(
}
}

@OptIn(ExperimentalFoundationApi::class)
@Suppress("FunctionName")
fun LazyListScope.CastTab(
teams: List<CastTeams>,
Expand Down Expand Up @@ -559,14 +563,19 @@ fun LazyListScope.CastTab(
* 중첩 Lazy 레이아웃 처리를 위해 높이 고정 필요
*/
val gridHeight = memberHeight * rows + spacedBySize * (rows - 1)
LazyVerticalGrid(
modifier = Modifier.height(gridHeight),
columns = GridCells.Fixed(spanCount),
verticalArrangement = Arrangement.spacedBy(spacedBySize),
horizontalArrangement = Arrangement.spacedBy(16.dp),
) {
items(team.members) { member ->
Cast(memberHeight, member, onClick = { onClickMember(member.userCode) })
CompositionLocalProvider(LocalOverscrollConfiguration provides null) {
LazyVerticalGrid(
modifier = Modifier.height(gridHeight),
columns = GridCells.Fixed(spanCount),
verticalArrangement = Arrangement.spacedBy(spacedBySize),
horizontalArrangement = Arrangement.spacedBy(16.dp),
) {
items(team.members) { member ->
Cast(
memberHeight,
member,
onClick = { onClickMember(member.userCode) })
}
}
}
}
Expand Down

0 comments on commit f9bc737

Please sign in to comment.