코인 -> 캔 변경

This commit is contained in:
Yu Sung
2023-08-15 01:27:30 +09:00
parent 0f8b740469
commit 0959fa55be
17 changed files with 35 additions and 36 deletions

View File

@@ -397,7 +397,7 @@ final class ContentDetailViewModel: ObservableObject {
func donation(can: Int, comment: String) {
if can <= 0 {
self.errorMessage = "1코인 이상 후원하실 수 있습니다."
self.errorMessage = "1 이상 후원하실 수 있습니다."
self.isShowPopup = true
} else if comment.trimmingCharacters(in: .whitespaces).isEmpty {
self.errorMessage = "함께 보낼 메시지를 입력하세요."
@@ -422,7 +422,7 @@ final class ContentDetailViewModel: ObservableObject {
if decoded.success {
UserDefaults.set(UserDefaults.int(forKey: .can) - can, forKey: .can)
self.errorMessage = "\(can)코인을 후원하셨습니다."
self.errorMessage = "\(can)을 후원하셨습니다."
self.isShowPopup = true
self.getAudioContentDetail()

View File

@@ -87,7 +87,7 @@ struct ContentOrderConfirmDialogView: View {
.cornerRadius(5.3)
.padding(.top, 21.3)
Text("콘텐츠를 \(orderType == .RENTAL ? "대여" : "소장")하시겠습니까?\n아래 코인이 차감됩니다.")
Text("콘텐츠를 \(orderType == .RENTAL ? "대여" : "소장")하시겠습니까?\n아래 이 차감됩니다.")
.font(.custom(Font.medium.rawValue, size: 13.3))
.foregroundColor(Color(hex: "eeeeee"))
.fixedSize(horizontal: false, vertical: true)

View File

@@ -108,9 +108,8 @@ struct LiveRoomDonationDialogView: View {
.background(Color(hex: "9970ff"))
.cornerRadius(6.7)
.onTapGesture {
if !donationCan.trimmingCharacters(in: .whitespaces).isEmpty,
let coin = Int(donationCan) {
donationCan = "\(coin + 100)"
if !donationCan.trimmingCharacters(in: .whitespaces).isEmpty, let can = Int(donationCan) {
donationCan = "\(can + 100)"
} else {
donationCan = "\(100)"
}