fix(creator): 라이브 empty 배치를 보정한다

This commit is contained in:
2026-06-19 21:47:12 +09:00
parent df78b8a3f5
commit e3cea856b8
3 changed files with 27 additions and 17 deletions

View File

@@ -30,7 +30,6 @@ class CreatorChannelLiveFragment : BaseFragment<FragmentCreatorChannelLiveBindin
private var lastContentLayoutKey: CreatorChannelLiveContentLayoutKey? = null
private var sortPopup: CreatorChannelSortPopup? = null
private var currentContentState: CreatorChannelLiveUiState.Content? = null
private var emptyMinHeight: Int = 0
private val creatorId: Long by lazy { arguments?.getLong(ARG_CREATOR_ID) ?: 0L }
private val host: Host
get() = requireActivity() as Host
@@ -66,10 +65,8 @@ class CreatorChannelLiveFragment : BaseFragment<FragmentCreatorChannelLiveBindin
viewModel.loadMore()
}
fun onCreatorChannelLiveViewportHeightChanged(minHeight: Int) {
emptyMinHeight = minHeight.coerceAtLeast(0)
applyEmptyMinHeight()
}
@Suppress("UNUSED_PARAMETER")
fun onCreatorChannelLiveViewportHeightChanged(minHeight: Int) = Unit
fun onCreatorChannelLiveOwnerCtaVisibilityChanged(isVisible: Boolean) = with(binding) {
val bottomPadding = if (isVisible) {
@@ -119,16 +116,11 @@ class CreatorChannelLiveFragment : BaseFragment<FragmentCreatorChannelLiveBindin
layoutCreatorChannelLiveCurrentCard.isVisible = false
rvCreatorChannelLiveReplays.isVisible = false
layoutCreatorChannelLiveEmpty.isVisible = true
applyEmptyMinHeight()
tvCreatorChannelLiveErrorMessage.isVisible = false
btnCreatorChannelLiveRetry.isVisible = false
host.onCreatorChannelLiveContentChanged()
}
private fun applyEmptyMinHeight() = with(binding) {
layoutCreatorChannelLiveEmpty.minimumHeight = emptyMinHeight
}
private fun bindError(state: CreatorChannelLiveUiState.Error) = with(binding) {
currentContentState = null
lastContentLayoutKey = null

View File

@@ -199,7 +199,8 @@
android:id="@+id/layout_creator_channel_live_empty"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="@dimen/spacing_48"
android:paddingBottom="@dimen/spacing_32"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -211,7 +212,7 @@
style="@style/Typography.Body3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_gravity="top|center_horizontal"
android:gravity="center"
android:text="@string/creator_channel_live_empty_message"
android:textColor="@color/gray_500" />