feat(creator): 채널 홈 스크롤 상태 계산을 추가한다

This commit is contained in:
2026-06-15 19:10:43 +09:00
parent cd5fbc0858
commit d3bfc57294
2 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package kr.co.vividnext.sodalive.v2.creator.channel.model
object CreatorChannelScrollState {
fun shouldUseBlackTitleBar(
titleBarBottom: Int,
tabBarTop: Int,
profileImageVisibleHeight: Int,
profileImageTotalHeight: Int
): Boolean {
val isTabBarCloseToTitleBar = tabBarTop <= titleBarBottom
val isProfileImageHalfHidden = profileImageVisibleHeight <= profileImageTotalHeight / 2
return isTabBarCloseToTitleBar && isProfileImageHalfHidden
}
fun calculateStickyTop(statusBarHeight: Int, titleBarHeight: Int): Int {
return statusBarHeight + titleBarHeight
}
}