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
@@ -236,6 +236,17 @@
android:orientation="vertical"
android:paddingBottom="@dimen/spacing_28">
<TextView
android:id="@+id/tv_home_following_empty"
style="@style/Typography.Body3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/screen_home_following_empty"
android:textAlignment="center"
android:textColor="@color/gray_500"
android:visibility="gone" />
<LinearLayout
android:id="@+id/ll_home_following_creators_section"
android:layout_width="match_parent"