-
Notifications
You must be signed in to change notification settings - Fork 0
[PC-1568] onboarding 페이지 이동 시 처음에 Lottie 파일들이 깜빡이는 이슈 수정 #193
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
Conversation
📝 WalkthroughWalkthroughTwo Compose UI files were updated: HorizontalPager configuration enhanced with preloading of one additional page beyond the viewport, and Lottie animation control refactored from stateful management to progress-based clipping for cleaner animation control. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Suggested labels
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
Comment |
| HorizontalPager( | ||
| state = pagerState, | ||
| userScrollEnabled = false, | ||
| modifier = Modifier.weight(1f) | ||
| modifier = Modifier.weight(1f), | ||
| beyondViewportPageCount = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
이거 백그라운드에서 미리 돌고있을 가능성은 없나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val isCurrentPage = pageIndex == currentPage
onboardingPages.getOrNull(pageIndex)?.let { data ->
PageContent(
titleRes = data.titleRes,
pageContentType = data.contentType,
isPageActive = isCurrentPage
)
}
StopAtProgressLottie(
lottieRes = pageContentType.lottieRes,
shouldPlay = isPageActive,
modifier = Modifier
.fillMaxWidth()
.aspectRatio(375f / 433f),
)
네, isPageActive를 StopAtProgressLottie의 shouldPlay 인자로 넘겨주고 있어서, 백그라운드 페이지가 미리 로드되더라도 사용자에게 보이면 재생됩니다.
(추가)
아래의 코드로 확인해보니 현재 페이지의 lottie만 재생되는 것도 확인했습니다!
LaunchedEffect(progress) {
if (shouldPlay && progress > 0f && progress < STOP_PROGRESS) {
android.util.Log.v("로티 체크", "$lottieRes 재생 중... 진행도: $progress")
}
}
kkh725
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다~
1. ⭐️ 변경된 내용
2. 🖼️ 스크린샷(선택)
default.mp4
3. 💡 알게된 부분
4. 📌 이 부분은 꼭 봐주세요!
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.