Skip to content

Commit

Permalink
Merge pull request #314 from team-peekabook/feature/#311-recommend-tap
Browse files Browse the repository at this point in the history
#311 [fix] 추천책 수정모드 초기화 로직 추가
  • Loading branch information
2zerozu authored Mar 22, 2024
2 parents 90e17e9 + aa2513d commit a0e8399
Showing 1 changed file with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,9 @@ class RecommendViewModel @Inject constructor(
viewModelScope.launch {
getRecommendUseCase()
.onSuccess { response ->
_recommendingBook.value =
response.recommendingBook.map { recommendingBook ->
recommendingBook.copy(isEditMode = requireNotNull(_isEditMode.value))
}
_recommendedBook.value =
response.recommendedBook.map { recommendedBook ->
recommendedBook.copy(isEditMode = requireNotNull(_isEditMode.value))
}
checkEditMode(
requireNotNull(_recommendingBook.value),
requireNotNull(_recommendedBook.value)
)
_isEditMode.value = false
_recommendingBook.value = response.recommendingBook
_recommendedBook.value = response.recommendedBook
}.onFailure { throwable ->
Timber.e("$throwable")
}
Expand Down

0 comments on commit a0e8399

Please sign in to comment.