비밀 미션
- 비밀 미션 이용 최소 금액 : 10캔 으로 설정
This commit is contained in:
@@ -516,10 +516,12 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
|||||||
LayoutInflater.from(this),
|
LayoutInflater.from(this),
|
||||||
isLiveDonation = true
|
isLiveDonation = true
|
||||||
) { can, message, isSecret ->
|
) { can, message, isSecret ->
|
||||||
if (can > 0) {
|
if (isSecret && can < 10) {
|
||||||
donation(can, message, isSecret)
|
showToast("비밀 미션은 최소 10캔 이상부터 이용이 가능합니다.")
|
||||||
} else {
|
} else if (can < 1) {
|
||||||
showToast("1캔 이상 후원하실 수 있습니다.")
|
showToast("1캔 이상 후원하실 수 있습니다.")
|
||||||
|
} else {
|
||||||
|
donation(can, message, isSecret)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,15 +53,36 @@ class LiveRoomDonationDialog(
|
|||||||
val can = dialogView.etDonationCan.text.toString().toInt()
|
val can = dialogView.etDonationCan.text.toString().toInt()
|
||||||
val message = dialogView.etDonationMessage.text.toString().prefix(200)
|
val message = dialogView.etDonationMessage.text.toString().prefix(200)
|
||||||
|
|
||||||
if (can > 0) {
|
if (isLiveDonation) {
|
||||||
bottomSheetDialog.dismiss()
|
val isSecret = dialogView.tvSecret.isSelected
|
||||||
onClickDonation(can, message, dialogView.tvSecret.isSelected)
|
|
||||||
|
if (isSecret && can < 10) {
|
||||||
|
Toast.makeText(
|
||||||
|
activity,
|
||||||
|
"비밀 미션은 최소 10캔 이상부터 이용이 가능합니다.",
|
||||||
|
Toast.LENGTH_LONG
|
||||||
|
).show()
|
||||||
|
} else if (can < 1) {
|
||||||
|
Toast.makeText(
|
||||||
|
activity,
|
||||||
|
"1캔 이상 후원하실 수 있습니다.",
|
||||||
|
Toast.LENGTH_LONG
|
||||||
|
).show()
|
||||||
|
} else {
|
||||||
|
bottomSheetDialog.dismiss()
|
||||||
|
onClickDonation(can, message, isSecret)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(
|
if (can > 0) {
|
||||||
activity,
|
bottomSheetDialog.dismiss()
|
||||||
"1캔 이상 후원하실 수 있습니다.",
|
onClickDonation(can, message, dialogView.tvSecret.isSelected)
|
||||||
Toast.LENGTH_LONG
|
} else {
|
||||||
).show()
|
Toast.makeText(
|
||||||
|
activity,
|
||||||
|
"1캔 이상 후원하실 수 있습니다.",
|
||||||
|
Toast.LENGTH_LONG
|
||||||
|
).show()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e: NumberFormatException) {
|
} catch (e: NumberFormatException) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
@@ -82,6 +103,11 @@ class LiveRoomDonationDialog(
|
|||||||
} else {
|
} else {
|
||||||
"함께 보낼 메시지 입력(최대 200자)"
|
"함께 보낼 메시지 입력(최대 200자)"
|
||||||
}
|
}
|
||||||
|
dialogView.etDonationCan.hint = if (!isSelected) {
|
||||||
|
"10캔 이상 입력하세요"
|
||||||
|
} else {
|
||||||
|
"1캔 이상 입력하세요"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dialogView.tvSecret.isSelected = false
|
dialogView.tvSecret.isSelected = false
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
android:layout_marginHorizontal="20dp"
|
android:layout_marginHorizontal="20dp"
|
||||||
android:background="@drawable/bg_round_corner_6_7_88333333"
|
android:background="@drawable/bg_round_corner_6_7_88333333"
|
||||||
android:fontFamily="@font/gmarket_sans_medium"
|
android:fontFamily="@font/gmarket_sans_medium"
|
||||||
android:hint="몇 캔을 후원할까요?"
|
android:hint="1캔 이상 입력하세요"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="numberSigned"
|
android:inputType="numberSigned"
|
||||||
android:padding="13.3dp"
|
android:padding="13.3dp"
|
||||||
|
|||||||
Reference in New Issue
Block a user