|
|
@@ -272,21 +272,29 @@ data class RewardDetailData(
|
|
|
* eg: x99天 x99 .....
|
|
|
*/
|
|
|
fun getCountDesc(showRewardName: Boolean = false): String {
|
|
|
- if (rewardResourceType == ProductTypeConstant.PRIVATE_CHAT_EXPERIENCE_CARD.type
|
|
|
- || rewardResourceType == ProductTypeConstant.VOICE_CALL_EXPERIENCE_CARD.type
|
|
|
- || rewardResourceType == ProductTypeConstant.VIDEO_CALL_EXPERIENCE_CARD.type
|
|
|
- ) {
|
|
|
- return getCompatString(R.string.commonui_count, (rewardNum * max(1, num)).toString())
|
|
|
- }
|
|
|
+ val days = getRemainDay(rewardDuration * 1000L)
|
|
|
+ //礼物是有效期奖品
|
|
|
+ return if (isExpiredReward()) {
|
|
|
+ when (rewardResourceType) {
|
|
|
+ ProductTypeConstant.PRIVATE_CHAT_EXPERIENCE_CARD.type, ProductTypeConstant.VOICE_CALL_EXPERIENCE_CARD.type, ProductTypeConstant.VIDEO_CALL_EXPERIENCE_CARD.type -> {
|
|
|
+ "${getCompatString(R.string.commonui_x_days, days)} x${max(1, rewardNum.toLong())}"
|
|
|
+ }
|
|
|
+
|
|
|
+ ProductTypeConstant.AvatarFrame.type, ProductTypeConstant.CHAT_BUBBLES.type -> {
|
|
|
+ getCompatString(R.string.commonui_x_days, days)
|
|
|
+ }
|
|
|
|
|
|
- return if (issueToPackage == -1 && carveUpNum > 0) {
|
|
|
- getCompatString(R.string.commonui_carveUp_num, carveUpNum.toString())
|
|
|
- } else if (isExpiredReward()) {
|
|
|
- //礼物是有效期奖品
|
|
|
- val days = getRemainDay(rewardDuration * 1000L)
|
|
|
- getCompatString(R.string.commonui_x_days, (days * max(num, 1)).toString())
|
|
|
+ else -> {
|
|
|
+ "${getCompatString(R.string.commonui_x_days, days)} x${max(1, num)}"
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
- getCompatString(R.string.commonui_count, (rewardNum * max(1, num)).toString())
|
|
|
+ //礼物在包裹能展示
|
|
|
+ if (issueToPackage == 1) {
|
|
|
+ "${getCompatString(R.string.commonui_count, rewardNum)} x${max(1, num)}"
|
|
|
+ } else {
|
|
|
+ getCompatString(R.string.commonui_count, rewardNum * max(1, num))
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|