Skip to content

Commit

Permalink
[fix/#160] ReviewViewModel 코드 수정 및 리뷰 한 명일 때도 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
blueme0 committed Feb 15, 2024
1 parent dbef3f7 commit 05601bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class ReviewFriendDetailFragment :
private fun initClick() {
val friendDetail = ReviewFriend(id, characterId, name, job)
binding.btnReview.setOnSingleClickListener {
viewModel.addSelectDetailFriendList(friendDetail)
if (viewModel.currentFriendIndex < viewModel.selectFriendList.size) {
viewModel.addSelectDetailFriendList(friendDetail)
(requireActivity() as? ReviewActivity)?.nextFriendDetailFragment()
} else {
viewModel.postRegisterReview()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
import timber.log.Timber

@HiltViewModel
class ReviewViewModel @Inject constructor(
Expand All @@ -21,7 +20,7 @@ class ReviewViewModel @Inject constructor(
val selectFriendList get() = _selectFriendList

private var _selectDetailFriendList = mutableListOf<ReviewFriend>()
val selectDetailFriendList get() = _selectFriendList
val selectDetailFriendList get() = _selectDetailFriendList

var meetingId: Long? = null

Expand Down

0 comments on commit 05601bf

Please sign in to comment.