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