feat(creator): 채널 홈 스크롤 상태 계산을 추가한다
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user