Skip to content

Commit

Permalink
Merge pull request #125 from THT-Team/feature/TOP-100_compose_version
Browse files Browse the repository at this point in the history
[TOP-100] Compose Version 변경 - 1.4.3 -> 1.6.6
  • Loading branch information
cwj-c authored Apr 27, 2024
2 parents d39590b + 504a656 commit 269330a
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 18 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
buildscript {
extra.apply {
set("compileSdk", 33)
set("compileSdk", 34)
set("minSdkVersion", 26)
set("targetSdk", 33)
set("targetSdk", 34)
set("versionCode", 1)
set("versionName", "1.0")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ fun ToHotCard(
loadFinishListener: (Boolean, Throwable?) -> Unit = { _, _ -> },
onHoldDoubleTab: () -> Unit = { }
) {
val pagerState = rememberPagerState()
val pagerState = rememberPagerState(
pageCount = { imageUrls.list.size }
)
var userInfoFullShow by remember { mutableStateOf(false) }

val fallingAnimatedProgress = remember { Animatable(0f) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import tht.feature.tohot.userData
@Composable
fun ToHotCardImagePager(
modifier: Modifier = Modifier,
pagerState: PagerState = rememberPagerState(),
pagerState: PagerState,
imageUrls: ImmutableListWrapper<String>,
isHold: Boolean,
isShaking: Boolean,
Expand All @@ -32,7 +32,6 @@ fun ToHotCardImagePager(
) {
HorizontalPager(
modifier = Modifier.fillMaxSize(),
pageCount = imageUrls.list.size,
state = pagerState
) { page ->
ToHotHoldCard(
Expand Down Expand Up @@ -63,7 +62,10 @@ private fun ToHotCardImagePagerPreview() {
ToHotCardImagePager(
imageUrls = userData.profileImgUrl,
isHold = false,
isShaking = false
isShaking = false,
pagerState = rememberPagerState(
pageCount = { 0 }
)
)
}

Expand All @@ -74,6 +76,9 @@ private fun ToHotCardImagePagerBlurPreview() {
ToHotCardImagePager(
imageUrls = userData.profileImgUrl,
isHold = true,
isShaking = false
isShaking = false,
pagerState = rememberPagerState(
pageCount = { 0 }
)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ fun ToHotPagerIndicator(
@Preview(showBackground = true, backgroundColor = 0xFF000000)
private fun ToHotPagerIndicatorPreview() {
ToHotPagerIndicator(
pagerState = rememberPagerState(),
pagerState = rememberPagerState(
pageCount = { 0 }
),
pageCount = 10,
width = 20.dp,
height = 20.dp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ import tht.feature.tohot.component.dialog.ToHotUseReportDialog
import tht.feature.tohot.component.dialog.ToHotUserBlockDialog
import tht.feature.tohot.component.dialog.ToHotUserMatchingDialog
import tht.feature.tohot.component.dialog.ToHotUserReportMenuDialog
import tht.feature.tohot.tohot.state.ToHotLoading
import tht.feature.tohot.tohot.state.ToHotSideEffect
import tht.feature.tohot.tohot.screen.ToHotScreen
import tht.feature.tohot.tohot.screen.TopicSelectModel
import tht.feature.tohot.tohot.state.ToHotLoading
import tht.feature.tohot.tohot.state.ToHotSideEffect
import tht.feature.tohot.tohot.viewmodel.ToHotViewModel

//TODO: 다른 탭에 갔을 때 일시 정지
Expand All @@ -52,7 +52,11 @@ internal fun ToHotRoute(
navigateLogout: () -> Unit
) {
val toHotState by toHotViewModel.store.state.collectAsState()
val pagerState = rememberPagerState()
val pagerState = rememberPagerState(
pageCount = {
toHotState.userList.list.size
}
)
val context = LocalContext.current

val userHeartLottieComposition by rememberLottieComposition(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ internal fun ToHotScreen(
ToHotCardState.Running -> {
VerticalPager(
userScrollEnabled = false,
pageCount = cardList.list.size,
state = pagerState,
key = { cardList.list[it].id }
) { idx ->
Expand Down Expand Up @@ -159,7 +158,9 @@ fun ToHotScreenPreview() {
ToHotScreen(
cardList = toHotState.userList,
toHotCardState = toHotState.userCardState,
pagerState = rememberPagerState(),
pagerState = rememberPagerState(
pageCount = { toHotState.userList.list.size }
),
timers = toHotState.timers,
currentUserIdx = toHotState.enableTimerIdx,
cardMoveAllow = toHotState.cardMoveAllow,
Expand Down
10 changes: 5 additions & 5 deletions gradle/libraries.version.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ glide = "4.14.2"
javax_mail = "1.6.2"

#jetpack compose
jetpack-compose = "1.4.3"
jetpack-compose-activity = "1.7.2"
jetpack-compose-viewmodel = "2.6.1"
jetpack-compose-navigation = "2.5.3"
jetpack-compose-hilt-navigation = "1.0.0"
jetpack-compose = "1.6.6"
jetpack-compose-activity = "1.9.0"
jetpack-compose-viewmodel = "2.7.0"
jetpack-compose-navigation = "2.7.7"
jetpack-compose-hilt-navigation = "1.2.0"
jetpack-compose-coil = "2.4.0"
app-compat-theme-adpater = "0.28.0"

Expand Down

0 comments on commit 269330a

Please sign in to comment.