Skip to content

Commit

Permalink
[MERGE] #275 -> develop
Browse files Browse the repository at this point in the history
[FIX/#275] 탐색 λ·° μ΅œμ’… QA
  • Loading branch information
arinming authored Oct 6, 2024
2 parents 088d7ff + 387bfe6 commit abb9dde
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.component.image.TerningImage
import com.terning.core.designsystem.theme.Black
import com.terning.core.designsystem.theme.Grey100
import com.terning.core.designsystem.theme.Grey300
import com.terning.core.designsystem.theme.Grey375
import com.terning.core.designsystem.theme.TerningMain
import com.terning.core.designsystem.theme.TerningSub3
Expand All @@ -38,7 +40,11 @@ fun InternTitle(
Row(
modifier = Modifier
.background(
color = TerningSub3,
color = if (dDay != "μ§€μ›λ§ˆκ°") {
TerningSub3
} else {
Grey100
},
shape = RoundedCornerShape(size = 5.dp)
)
.width(70.dp)
Expand All @@ -49,7 +55,11 @@ fun InternTitle(
Text(
text = dDay,
style = TerningTheme.typography.title3,
color = TerningMain,
color = if (dDay != "μ§€μ›λ§ˆκ°") {
TerningMain
} else {
Grey300
}
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,16 @@ fun ImageSlider(
images: List<Int>,
onAdvertisementClick: () -> Unit,
) {
val infiniteImages = remember { images + images + images }
val pagerState = rememberPagerState(
initialPage = images.size,
initialPageOffsetFraction = 0f,
pageCount = { infiniteImages.size }
initialPage = 0,
pageCount = { Int.MAX_VALUE }
)
val autoScroll = remember { mutableStateOf(true) }

LaunchedEffect(autoScroll.value) {
if (autoScroll.value) {
while (true) {
delay(2000)
delay(3000)
if (!pagerState.isScrollInProgress) {
val nextPage = pagerState.currentPage + 1
pagerState.animateScrollToPage(nextPage)
Expand All @@ -47,14 +45,6 @@ fun ImageSlider(
}
}

LaunchedEffect(pagerState.currentPage) {
if (pagerState.currentPage < images.size) {
pagerState.scrollToPage(pagerState.currentPage + images.size)
} else if (pagerState.currentPage >= 2 * images.size) {
pagerState.scrollToPage(pagerState.currentPage - images.size)
}
}

Column(
modifier
.fillMaxWidth()
Expand All @@ -68,10 +58,11 @@ fun ImageSlider(
HorizontalPager(
state = pagerState,
modifier = modifier,
beyondViewportPageCount = infiniteImages.size
beyondViewportPageCount = 1
) { currentPage ->
val pageIndex = currentPage % images.size
Image(
painter = painterResource(id = infiniteImages[currentPage % images.size]),
painter = painterResource(id = images[pageIndex]),
contentDescription = null,
modifier = modifier
.fillMaxWidth()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ fun SearchProcessScreen(
}
}

if (state.existSearchResults) {
if (internSearchResultData.isNotEmpty()) {
LazyColumn(
contentPadding = PaddingValues(
top = 12.dp,
Expand Down Expand Up @@ -319,6 +319,7 @@ fun SearchProcessScreen(
color = Grey400,
)
}

}
}
}
Expand Down

0 comments on commit abb9dde

Please sign in to comment.