Skip to content

Commit

Permalink
[FIX/#257] 엠티뷰 생성 시점 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Mar 13, 2024
1 parent bfa5ca1 commit 21cda2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import androidx.core.view.isVisible
import androidx.lifecycle.flowWithLifecycle
import androidx.lifecycle.lifecycleScope
import com.going.domain.entity.response.CheckFriendsModel
import com.going.domain.entity.response.TripParticipantModel
import com.going.presentation.R
import com.going.presentation.databinding.ActivityCheckFriendsBinding
import com.going.presentation.profile.participant.ParticipantProfileActivity
Expand Down Expand Up @@ -89,22 +88,16 @@ class CheckFriendsActivity :
}

private fun setFriendsData(data: CheckFriendsModel) {
adapter.submitList(data.participants)

setEmptyView(data.participants)
setProgressBarStatus(data.styles.map { it.rates })
setCountStatus(data.styles.map { it.counts })
setResultTextColor(data.bestPrefer)
}

private fun setEmptyView(participants: List<TripParticipantModel>) {
if (participants.size == 1) {
with(binding) {
svCheckFriends.isVisible = false
layoutCheckFriendsEmpty.isVisible = true
}
if (data.participants.size == 1) {
binding.layoutCheckFriendsEmpty.isVisible = true
setInviteCode()
initInviteBtnListener()
} else {
binding.svCheckFriends.isVisible = true
adapter.submitList(data.participants)
setProgressBarStatus(data.styles.map { it.rates })
setCountStatus(data.styles.map { it.counts })
setResultTextColor(data.bestPrefer)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
android:id="@+id/sv_check_friends"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down

0 comments on commit 21cda2d

Please sign in to comment.