Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX/#275] 탐색 뷰 최종 QA #282

Merged
merged 3 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading