Skip to content

Commit

Permalink
✨ [#283] MyPagePrizeFeature / prize 안 접히는 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
kimsh153 committed Sep 4, 2023
1 parent b71520c commit 22d484b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ final class MyPageIntent: MyPageIntentProtocol {
$0.toModel()
}
)
model?.setCollapsedPrize(size: profile.prizes.count)
} catch {
model?.updateIsError(isError: true)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ protocol MyPagePrizeStateProtocol {

protocol MyPagePrizeActionProtocol: AnyObject {
func toggleCollapsedPrize(index: Int)
func setCollapsedPrize(size: Int)
func updatePrizeList(prizeList: [PrizeModel])
func updatePrizeName(index: Int, name: String)
func updatePrizePrize(index: Int, prize: String)
Expand All @@ -44,6 +45,10 @@ extension MyPageModel: MyPagePrizeActionProtocol {
self.collapsedPrize[index].toggle()
}

func setCollapsedPrize(size: Int) {
self.collapsedPrize = Array(repeating: false, count: size)
}

func updatePrizeList(prizeList: [PrizeModel]) {
self.prizeList = prizeList
}
Expand Down

0 comments on commit 22d484b

Please sign in to comment.