Skip to content

Commit

Permalink
Merge pull request #305 from YeoGiDa/bug/#304-follow-empty
Browse files Browse the repository at this point in the history
[FIX] 팔로잉의 여행지 엠티뷰
  • Loading branch information
hjh1161514 authored Jan 14, 2023
2 parents 3709cbc + 0e29ec6 commit 1d78c3d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class HomeFragment : Fragment() {
YeogidaClient.homeService.getRecentTrip().customEnqueue(
onSuccess = {
recentTripAdapter.tripList.clear()
binding.tvHomeFollowRecentTripEmpty.text = ""
it.data?.let { data -> recentTripAdapter.tripList.addAll(data.tripList) }
recentTripAdapter.notifyDataSetChanged()
}
Expand All @@ -114,9 +115,13 @@ class HomeFragment : Fragment() {
},
onError = {
if (it.message == "No one Follow Error!") {
recentTripAdapter.tripList.clear()
recentTripAdapter.notifyDataSetChanged()
binding.tvHomeFollowRecentTripEmpty.text =
"아직 팔로잉한 사람이 없어요\n사람들을 팔로잉 해보세요!"
} else if (it.message == "Trip NotFound Error!") {
recentTripAdapter.tripList.clear()
recentTripAdapter.notifyDataSetChanged()
binding.tvHomeFollowRecentTripEmpty.text =
"팔로잉들이 아직 게시글을 올리지 않았어요\n더 많은 사람들을 팔로잉 해보세요!"
}
Expand Down

0 comments on commit 1d78c3d

Please sign in to comment.