fix(donation): 후원 내역 고액 header 색상을 보정한다
This commit is contained in:
@@ -37,7 +37,7 @@ private fun CreatorChannelDonationResponse.toDonationUiModel(
|
||||
|
||||
@ColorRes
|
||||
internal fun calculateDonationHeaderColorRes(can: Int): Int = when {
|
||||
can >= 500 -> R.color.red_400
|
||||
can >= 501 -> R.color.red_400
|
||||
can >= 101 -> R.color.creator_channel_donation_cyan
|
||||
can >= 51 -> R.color.green_400
|
||||
else -> R.color.gray_200
|
||||
|
||||
@@ -133,6 +133,13 @@ class CreatorChannelDonationAdapter(
|
||||
item.can.moneyFormat()
|
||||
)
|
||||
tvCreatorChannelDonationMessage.text = item.message
|
||||
if (item.headerColorResId == R.color.red_400) {
|
||||
tvCreatorChannelDonationNickname.setTextColor(root.context.getColor(R.color.white))
|
||||
tvCreatorChannelDonationCreatedAt.setTextColor(root.context.getColor(R.color.gray_100))
|
||||
} else {
|
||||
tvCreatorChannelDonationNickname.setTextColor(root.context.getColor(R.color.black))
|
||||
tvCreatorChannelDonationCreatedAt.setTextColor(root.context.getColor(R.color.gray_700))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user