fix(home): 팔로잉 empty 문구를 중앙 표시한다

This commit is contained in:
2026-07-13 16:17:12 +09:00
parent da36964347
commit 2c609836fd
3 changed files with 46 additions and 5 deletions
@@ -313,9 +313,9 @@ class HomeMainFragment : BaseFragment<FragmentV2MainHomeBinding>(
homeFollowingViewModel.followingStateLiveData.observe(viewLifecycleOwner) { state ->
when (state) {
is HomeFollowingUiState.Content -> bindHomeFollowingContent(state)
HomeFollowingUiState.Empty -> bindHomeFollowingEmpty(showEmptyMessage = true)
HomeFollowingUiState.LoginRequired,
HomeFollowingUiState.Empty,
is HomeFollowingUiState.Error -> bindHomeFollowingEmpty()
is HomeFollowingUiState.Error -> bindHomeFollowingEmpty(showEmptyMessage = false)
HomeFollowingUiState.Loading -> Unit
}
@@ -378,6 +378,7 @@ class HomeMainFragment : BaseFragment<FragmentV2MainHomeBinding>(
}
private fun bindHomeFollowingContent(content: HomeFollowingUiState.Content) {
binding.tvHomeFollowingEmpty.visibility = View.GONE
bindFollowingCreatorSection(content.followingCreators)
bindFollowingLiveSection(content.onAirLives)
bindFollowingChatSection(content.recentChats)
@@ -385,7 +386,8 @@ class HomeMainFragment : BaseFragment<FragmentV2MainHomeBinding>(
bindFollowingNewsSection(content.recentNews)
}
private fun bindHomeFollowingEmpty() {
private fun bindHomeFollowingEmpty(showEmptyMessage: Boolean) {
binding.tvHomeFollowingEmpty.visibility = if (showEmptyMessage) View.VISIBLE else View.GONE
binding.llHomeFollowingCreatorsSection.visibility = View.GONE
binding.llHomeFollowingOnAirSection.visibility = View.GONE
binding.llHomeFollowingRecentChatsSection.visibility = View.GONE