Skip to content

Commit

Permalink
[fix/#170] 카드 후면 관심사 수정 가능
Browse files Browse the repository at this point in the history
  • Loading branch information
blueme0 committed Feb 16, 2024
1 parent bf1cc7c commit c43f4d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ class CardFixFragment
val bc = BackCard(goalContent = goalText.value, characterResId = SignupUtils.CHARACTER_CARD_LIST_BACK[characterId.value])
binding.cardviewBack.getInstance(bc)
binding.cardviewBack.apply {
submitInterestList(interests)
isModify = false
setIsModifyDetail(true)
submitInterestList(interests)
}
}
}
Expand Down Expand Up @@ -199,7 +199,7 @@ class CardFixFragment
if (!isFirstLoaded) {
val selfArray = resources.getStringArray(R.array.interest_1)
val fieldArray = resources.getStringArray(R.array.interest_2)
viewModel.setAllInterests(interests.map { it.toString() }, selfArray, fieldArray)
viewModel.setAllInterests(interests.map { it.interest.toString() }, selfArray, fieldArray)
}
isFirstLoaded = false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ class BackCardView : CardView, OnCurrentListChangedListener<Interest> {
fun submitInterestList(interests: List<Interest>) {
val currentList = interestAdapter.currentList.toMutableList()

if (!currentList.any { it.interest == "추가하기" } && isModifyDetail) {
if (isModifyDetail) {
currentList.removeAll { it.interest == "추가하기" }
currentList.add(Interest("추가하기"))
}

Expand Down

0 comments on commit c43f4d7

Please sign in to comment.