비밀 미션

- 비밀 미션 이용 최소 금액 : 10캔 으로 설정
This commit is contained in:
Yu Sung
2024-11-21 00:25:29 +09:00
parent 8b7d673942
commit 65e9974451
2 changed files with 19 additions and 9 deletions

View File

@@ -447,7 +447,13 @@ final class LiveRoomViewModel: NSObject, ObservableObject {
}
func donation(can: Int, message: String = "", isSecret: Bool = false) {
if can > 0 {
if isSecret && can < 10 {
popupContent = "비밀 미션은 최소 10캔 이상부터 이용이 가능합니다."
isShowPopup = true
} else if can < 1 {
popupContent = "1캔 이상 후원하실 수 있습니다."
isShowPopup = true
} else {
isLoading = true
repository.donation(roomId: AppState.shared.roomId, can: can, message: message, isSecret: isSecret)
@@ -567,9 +573,6 @@ final class LiveRoomViewModel: NSObject, ObservableObject {
}
}
.store(in: &subscription)
} else {
popupContent = "1캔 이상 후원하실 수 있습니다."
isShowPopup = true
}
}