diff --git a/android/app/src/main/java/com/happy/friendogly/presentation/ui/chatlist/ChatListFragment.kt b/android/app/src/main/java/com/happy/friendogly/presentation/ui/chatlist/ChatListFragment.kt index 7728c2666..293673d65 100644 --- a/android/app/src/main/java/com/happy/friendogly/presentation/ui/chatlist/ChatListFragment.kt +++ b/android/app/src/main/java/com/happy/friendogly/presentation/ui/chatlist/ChatListFragment.kt @@ -29,6 +29,14 @@ class ChatListFragment : viewModel.chats.observe(viewLifecycleOwner) { chats -> adapter.submitList(chats) } + swipeEvent() + } + + private fun swipeEvent() { + binding.swipelayoutChatListRefresh.setOnRefreshListener { + viewModel.getChats() + binding.swipelayoutChatListRefresh.isRefreshing = false + } } override fun navigateToChat(chatId: Long) { diff --git a/android/app/src/main/res/layout/fragment_chat_list.xml b/android/app/src/main/res/layout/fragment_chat_list.xml index bfde55684..2f6b5bab9 100644 --- a/android/app/src/main/res/layout/fragment_chat_list.xml +++ b/android/app/src/main/res/layout/fragment_chat_list.xml @@ -6,34 +6,41 @@ - - - - + + android:layout_height="match_parent" + android:background="@color/white"> - + android:background="@drawable/rect_gray03_botline_bot1"> - - + - + + + + + + + + + -