coin -> can,
코인 -> 캔 으로 변경
This commit is contained in:
@@ -30,34 +30,34 @@ class AudioContentCommentAdapter(
|
||||
}
|
||||
|
||||
val tvCommentLayoutParams = binding.tvComment.layoutParams as LinearLayout.LayoutParams
|
||||
val coin = item.donationCoin
|
||||
if (coin > 0) {
|
||||
val can = item.donationCan
|
||||
if (can > 0) {
|
||||
tvCommentLayoutParams.topMargin = 0
|
||||
binding.llDonationCoin.visibility = View.VISIBLE
|
||||
binding.tvDonationCoin.text = coin.moneyFormat()
|
||||
binding.llDonationCoin.setBackgroundResource(
|
||||
binding.llDonationCan.visibility = View.VISIBLE
|
||||
binding.tvDonationCan.text = can.moneyFormat()
|
||||
binding.llDonationCan.setBackgroundResource(
|
||||
when {
|
||||
coin >= 100000 -> {
|
||||
can >= 100000 -> {
|
||||
R.drawable.bg_round_corner_10_7_973a3a
|
||||
}
|
||||
|
||||
coin >= 50000 -> {
|
||||
can >= 50000 -> {
|
||||
R.drawable.bg_round_corner_10_7_d85e37
|
||||
}
|
||||
|
||||
coin >= 10000 -> {
|
||||
can >= 10000 -> {
|
||||
R.drawable.bg_round_corner_10_7_d38c38
|
||||
}
|
||||
|
||||
coin >= 5000 -> {
|
||||
can >= 5000 -> {
|
||||
R.drawable.bg_round_corner_10_7_59548f
|
||||
}
|
||||
|
||||
coin >= 1000 -> {
|
||||
can >= 1000 -> {
|
||||
R.drawable.bg_round_corner_10_7_4d6aa4
|
||||
}
|
||||
|
||||
coin >= 500 -> {
|
||||
can >= 500 -> {
|
||||
R.drawable.bg_round_corner_10_7_2d7390
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class AudioContentCommentAdapter(
|
||||
)
|
||||
} else {
|
||||
tvCommentLayoutParams.topMargin = 13.3f.dpToPx().toInt()
|
||||
binding.llDonationCoin.visibility = View.GONE
|
||||
binding.llDonationCan.visibility = View.GONE
|
||||
}
|
||||
binding.tvComment.layoutParams = tvCommentLayoutParams
|
||||
|
||||
|
@@ -15,7 +15,7 @@ data class GetAudioContentCommentListItem(
|
||||
@SerializedName("nickname") val nickname: String,
|
||||
@SerializedName("profileUrl") val profileUrl: String,
|
||||
@SerializedName("comment") val comment: String,
|
||||
@SerializedName("donationCoin") val donationCoin: Int,
|
||||
@SerializedName("donationCan") val donationCan: Int,
|
||||
@SerializedName("date") val date: String,
|
||||
@SerializedName("replyCount") val replyCount: Int
|
||||
) : Parcelable
|
||||
|
@@ -248,7 +248,7 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
|
||||
LayoutInflater.from(this)
|
||||
) { can, message ->
|
||||
if (can <= 0) {
|
||||
showToast("1코인 이상 후원하실 수 있습니다.")
|
||||
showToast("1캔 이상 후원하실 수 있습니다.")
|
||||
} else if (message.isBlank()) {
|
||||
showToast("함께 보낼 메시지를 입력하세요.")
|
||||
} else {
|
||||
@@ -260,8 +260,8 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
|
||||
}
|
||||
}
|
||||
|
||||
private fun donation(coin: Int, message: String) {
|
||||
viewModel.donation(audioContentId, coin, message) {
|
||||
private fun donation(can: Int, message: String) {
|
||||
viewModel.donation(audioContentId, can, message) {
|
||||
viewModel.getAudioContentDetail(audioContentId = audioContentId) { finish() }
|
||||
}
|
||||
}
|
||||
|
@@ -72,9 +72,9 @@ class AudioContentOrderConfirmDialog(
|
||||
}
|
||||
|
||||
dialogView.tvNotice.text = if (orderType == OrderType.RENTAL) {
|
||||
"콘텐츠를 대여하시겠습니까?\n아래 코인이 차감됩니다."
|
||||
"콘텐츠를 대여하시겠습니까?\n아래 캔이 차감됩니다."
|
||||
} else {
|
||||
"콘텐츠를 소장하시겠습니까?\n아래 코인이 차감됩니다."
|
||||
"콘텐츠를 소장하시겠습니까?\n아래 캔이 차감됩니다."
|
||||
}
|
||||
|
||||
dialogView.tvCancel.setOnClickListener {
|
||||
|
@@ -212,7 +212,7 @@ class AudioContentUploadViewModel(
|
||||
}
|
||||
|
||||
if (!isPriceFreeLiveData.value!! && price < 10) {
|
||||
_toastLiveData.postValue("콘텐츠의 최소금액은 10코인 입니다.")
|
||||
_toastLiveData.postValue("콘텐츠의 최소금액은 10캔 입니다.")
|
||||
return false
|
||||
}
|
||||
|
||||
|
@@ -42,7 +42,7 @@ data class UserDonationRankingResponse(
|
||||
@SerializedName("userId") val userId: Long,
|
||||
@SerializedName("nickname") val nickname: String,
|
||||
@SerializedName("profileImage") val profileImage: String,
|
||||
@SerializedName("donationCoin") val donationCoin: Int
|
||||
@SerializedName("donationCan") val donationCan: Int
|
||||
)
|
||||
|
||||
data class SimilarCreatorResponse(
|
||||
|
@@ -13,5 +13,5 @@ data class MakeLiveReservationResponse(
|
||||
@SerializedName("price") val price: String,
|
||||
@SerializedName("haveCan") val haveCan: Int,
|
||||
@SerializedName("useCan") val useCan: Int,
|
||||
@SerializedName("remainingCoin") val remainingCoin: Int
|
||||
@SerializedName("remainingCan") val remainingCan: Int
|
||||
) : Parcelable
|
||||
|
@@ -34,9 +34,9 @@ class LiveReservationCompleteActivity : BaseActivity<ActivityLiveReservationComp
|
||||
binding.tvDate.text = response.beginDateString
|
||||
binding.tvPrice.text = response.price
|
||||
|
||||
binding.tvHaveCoin.text = "${response.haveCan}"
|
||||
binding.tvUseCoin.text = "${response.useCan}"
|
||||
binding.tvRemainingCoin.text = "${response.remainingCoin}"
|
||||
binding.tvHaveCan.text = "${response.haveCan}"
|
||||
binding.tvUseCan.text = "${response.useCan}"
|
||||
binding.tvRemainingCan.text = "${response.remainingCan}"
|
||||
|
||||
binding.tvGoHome.setOnClickListener {
|
||||
val intent = Intent(applicationContext, MainActivity::class.java)
|
||||
|
@@ -113,7 +113,7 @@ class LiveReservationCancelActivity : BaseActivity<ActivityLiveReservationCancel
|
||||
startActivity(Intent(applicationContext, MainActivity::class.java))
|
||||
}
|
||||
|
||||
binding.tvCheckCoinStatus.setOnClickListener {
|
||||
binding.tvCheckCanStatus.setOnClickListener {
|
||||
startActivity(Intent(applicationContext, CanStatusActivity::class.java))
|
||||
}
|
||||
|
||||
@@ -152,10 +152,10 @@ class LiveReservationCancelActivity : BaseActivity<ActivityLiveReservationCancel
|
||||
}
|
||||
|
||||
if (response.price > 0) {
|
||||
binding.tvCheckCoinStatus.visibility = View.VISIBLE
|
||||
binding.tvPrice.text = "${response.price}코인"
|
||||
binding.tvCheckCanStatus.visibility = View.VISIBLE
|
||||
binding.tvPrice.text = "${response.price}캔"
|
||||
} else {
|
||||
binding.tvCheckCoinStatus.visibility = View.GONE
|
||||
binding.tvCheckCanStatus.visibility = View.GONE
|
||||
binding.tvPrice.text = "무료"
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ class LiveReservationStatusAdapter(
|
||||
}
|
||||
|
||||
binding.tvPrice.text = if (item.price > 0) {
|
||||
"${item.price}코인"
|
||||
"${item.price}캔"
|
||||
} else {
|
||||
"무료"
|
||||
}
|
||||
|
@@ -233,7 +233,7 @@ data class LiveRoomNormalChat(
|
||||
} else {
|
||||
itemBinding.llMessageBg.setBackgroundResource(R.drawable.bg_round_corner_3_3_99000000)
|
||||
}
|
||||
itemBinding.ivCoin.visibility = View.GONE
|
||||
itemBinding.ivCan.visibility = View.GONE
|
||||
itemBinding.tvDonationMessage.visibility = View.GONE
|
||||
itemBinding.root.setBackgroundResource(0)
|
||||
itemBinding.root.setPadding(0)
|
||||
@@ -244,7 +244,7 @@ data class LiveRoomDonationChat(
|
||||
@SerializedName("profileUrl") val profileUrl: String,
|
||||
@SerializedName("nickname") val nickname: String,
|
||||
@SerializedName("chat") val chat: String,
|
||||
@SerializedName("coin") val coin: Int,
|
||||
@SerializedName("can") val can: Int,
|
||||
@SerializedName("donationMessage") val donationMessage: String,
|
||||
) : LiveRoomChat() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@@ -285,7 +285,7 @@ data class LiveRoomDonationChat(
|
||||
itemBinding.tvNickname.text = spNickname
|
||||
itemBinding.ivProfile.setOnClickListener {}
|
||||
|
||||
itemBinding.ivCoin.visibility = View.VISIBLE
|
||||
itemBinding.ivCan.visibility = View.VISIBLE
|
||||
itemBinding.ivBg.visibility = View.GONE
|
||||
itemBinding.ivCrown.visibility = View.GONE
|
||||
itemBinding.tvCreatorOrManager.visibility = View.GONE
|
||||
@@ -302,27 +302,27 @@ data class LiveRoomDonationChat(
|
||||
|
||||
itemBinding.root.setBackgroundResource(
|
||||
when {
|
||||
coin >= 100000 -> {
|
||||
can >= 100000 -> {
|
||||
R.drawable.bg_round_corner_6_7_c25264
|
||||
}
|
||||
|
||||
coin >= 50000 -> {
|
||||
can >= 50000 -> {
|
||||
R.drawable.bg_round_corner_6_7_e6d85e37
|
||||
}
|
||||
|
||||
coin >= 10000 -> {
|
||||
can >= 10000 -> {
|
||||
R.drawable.bg_round_corner_6_7_e6d38c38
|
||||
}
|
||||
|
||||
coin >= 5000 -> {
|
||||
can >= 5000 -> {
|
||||
R.drawable.bg_round_corner_6_7_e659548f
|
||||
}
|
||||
|
||||
coin >= 1000 -> {
|
||||
can >= 1000 -> {
|
||||
R.drawable.bg_round_corner_6_7_e64d6aa4
|
||||
}
|
||||
|
||||
coin >= 500 -> {
|
||||
can >= 500 -> {
|
||||
R.drawable.bg_round_corner_6_7_e62d7390
|
||||
}
|
||||
|
||||
|
@@ -152,16 +152,16 @@ class LiveRoomDetailFragment(
|
||||
}
|
||||
|
||||
if (response.price > 0) {
|
||||
binding.tvCoin.text = response.price.toString()
|
||||
binding.tvCoin.setCompoundDrawablesWithIntrinsicBounds(
|
||||
binding.tvCan.text = response.price.toString()
|
||||
binding.tvCan.setCompoundDrawablesWithIntrinsicBounds(
|
||||
0,
|
||||
0,
|
||||
R.drawable.ic_can,
|
||||
0
|
||||
)
|
||||
} else {
|
||||
binding.tvCoin.text = "무료"
|
||||
binding.tvCoin.setCompoundDrawablesWithIntrinsicBounds(
|
||||
binding.tvCan.text = "무료"
|
||||
binding.tvCan.setCompoundDrawablesWithIntrinsicBounds(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
@@ -36,11 +36,11 @@ class LiveRoomPasswordDialog(
|
||||
alertDialog.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||
|
||||
if (can > 0) {
|
||||
dialogView.tvCoin.visibility = View.VISIBLE
|
||||
dialogView.tvCoin.text = can.moneyFormat()
|
||||
dialogView.tvCan.visibility = View.VISIBLE
|
||||
dialogView.tvCan.text = can.moneyFormat()
|
||||
dialogView.tvConfirm.text = "으로 입장"
|
||||
} else {
|
||||
dialogView.tvCoin.visibility = View.GONE
|
||||
dialogView.tvCan.visibility = View.GONE
|
||||
dialogView.tvConfirm.text = "입장하기"
|
||||
}
|
||||
|
||||
|
@@ -35,23 +35,23 @@ class LiveRoomDonationDialog(
|
||||
dialogView.tvCancel.setOnClickListener { bottomSheetDialog.dismiss() }
|
||||
dialogView.tvDonation.setOnClickListener {
|
||||
try {
|
||||
val coin = dialogView.etDonationCoin.text.toString().toInt()
|
||||
val can = dialogView.etDonationCan.text.toString().toInt()
|
||||
val message = dialogView.etDonationMessage.text.toString()
|
||||
|
||||
if (coin > 0) {
|
||||
if (can > 0) {
|
||||
bottomSheetDialog.dismiss()
|
||||
onClickDonation(coin, message)
|
||||
onClickDonation(can, message)
|
||||
} else {
|
||||
Toast.makeText(
|
||||
activity,
|
||||
"1코인 이상 후원하실 수 있습니다.",
|
||||
"1캔 이상 후원하실 수 있습니다.",
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
}
|
||||
} catch (e: NumberFormatException) {
|
||||
Toast.makeText(
|
||||
activity,
|
||||
"1코인 이상 후원하실 수 있습니다.",
|
||||
"1캔 이상 후원하실 수 있습니다.",
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
}
|
||||
@@ -75,11 +75,11 @@ class LiveRoomDonationDialog(
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun setupView() {
|
||||
dialogView.tvCoin.text = SharedPreferenceManager.can.moneyFormat()
|
||||
dialogView.tvPlus10.setOnClickListener { addCoin(10) }
|
||||
dialogView.tvPlus100.setOnClickListener { addCoin(100) }
|
||||
dialogView.tvPlus1000.setOnClickListener { addCoin(1000) }
|
||||
dialogView.tvPlus10000.setOnClickListener { addCoin(10000) }
|
||||
dialogView.tvCan.text = SharedPreferenceManager.can.moneyFormat()
|
||||
dialogView.tvPlus10.setOnClickListener { addCan(10) }
|
||||
dialogView.tvPlus100.setOnClickListener { addCan(100) }
|
||||
dialogView.tvPlus1000.setOnClickListener { addCan(1000) }
|
||||
dialogView.tvPlus10000.setOnClickListener { addCan(10000) }
|
||||
|
||||
dialogView.ivProfile.load(SharedPreferenceManager.profileImage) {
|
||||
crossfade(true)
|
||||
@@ -87,7 +87,7 @@ class LiveRoomDonationDialog(
|
||||
transformations(CircleCropTransformation())
|
||||
}
|
||||
|
||||
dialogView.tvCoin.setOnClickListener {
|
||||
dialogView.tvCan.setOnClickListener {
|
||||
bottomSheetDialog.dismiss()
|
||||
|
||||
val intent = Intent(activity, CanChargeActivity::class.java)
|
||||
@@ -97,12 +97,12 @@ class LiveRoomDonationDialog(
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun addCoin(coin: Int) {
|
||||
private fun addCan(can: Int) {
|
||||
try {
|
||||
val currentCoin = dialogView.etDonationCoin.text.toString().toInt()
|
||||
dialogView.etDonationCoin.setText((currentCoin + coin).toString())
|
||||
val currentCan = dialogView.etDonationCan.text.toString().toInt()
|
||||
dialogView.etDonationCan.setText((currentCan + can).toString())
|
||||
} catch (e: NumberFormatException) {
|
||||
dialogView.etDonationCoin.setText(coin.toString())
|
||||
dialogView.etDonationCan.setText(can.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ class LiveRoomDonationMessageAdapter(
|
||||
@SuppressLint("SetTextI18n")
|
||||
fun bind(item: LiveRoomDonationMessage) {
|
||||
binding.tvNickname.text = "${item.nickname}님이"
|
||||
binding.tvCoinMessage.text = item.canMessage
|
||||
binding.tvCanMessage.text = item.canMessage
|
||||
binding.tvDonationMessage.text = "\"${item.donationMessage}\""
|
||||
binding.ivDelete.setOnClickListener { onClickDeleteMessage(item.uuid) }
|
||||
|
||||
|
@@ -35,7 +35,7 @@ class LiveRoomDonationRankingDialog(
|
||||
adapter.items.clear()
|
||||
adapter.items.addAll(it.donationList)
|
||||
adapter.notifyDataSetChanged()
|
||||
dialogView.tvTotalCoin.text = it.totalCan.moneyFormat()
|
||||
dialogView.tvTotalCan.text = it.totalCan.moneyFormat()
|
||||
dialogView.tvTotalCount.text = it.totalCount.moneyFormat()
|
||||
}
|
||||
}
|
||||
|
@@ -207,7 +207,7 @@ class CanPaymentActivity : BaseActivity<ActivityCanPaymentBinding>(
|
||||
viewModel.verify(
|
||||
request,
|
||||
onSuccess = {
|
||||
Toast.makeText(applicationContext, "코인이 충전되었습니다", Toast.LENGTH_LONG).show()
|
||||
Toast.makeText(applicationContext, "캔이 충전되었습니다", Toast.LENGTH_LONG).show()
|
||||
if (prevLiveRoom) {
|
||||
setResult(RESULT_OK)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user