feat(chat-character): 채팅 톡 탭

- 데이터가 없으면 "대화 중인 톡이 없습니다" 메시지 표시
This commit is contained in:
2025-08-13 01:23:56 +09:00
parent 08f9d398c4
commit 4eedecd1ce
2 changed files with 21 additions and 0 deletions

View File

@@ -50,7 +50,14 @@ class TalkTabFragment : BaseFragment<FragmentTalkTabBinding>(
// 대화방 목록 관찰
viewModel.talkRooms.observe(viewLifecycleOwner) {
if (it.isNotEmpty()) {
binding.rvTalk.visibility = View.VISIBLE
binding.tvEmpty.visibility = View.GONE
adapter.submitList(it)
} else {
adapter.submitList(emptyList())
binding.rvTalk.visibility = View.GONE
binding.tvEmpty.visibility = View.VISIBLE
binding.tvEmpty.text = "대화 중인 톡이 없습니다"
}
}

View File

@@ -15,4 +15,18 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="대화 중인 톡이 없습니다"
android:textColor="@android:color/white"
android:textSize="20sp"
android:fontFamily="@font/pretendard_regular"
android:visibility="gone"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>