|
|
@@ -293,6 +293,38 @@ data class RewardDetailData(
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取描述文案,分行显示
|
|
|
+ * eg: x99天 x99 .....
|
|
|
+ */
|
|
|
+ fun getCountDescWithTwoLine(showRewardName: Boolean = false): String {
|
|
|
+ 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 -> {
|
|
|
+ "x${max(1, rewardNum.toLong())}(${getCompatString(R.string.operation_days, days)})"
|
|
|
+ }
|
|
|
+
|
|
|
+ ProductTypeConstant.AvatarFrame.type, ProductTypeConstant.CHAT_BUBBLES.type -> {
|
|
|
+ getCompatString(R.string.commonui_x_days, days)
|
|
|
+ }
|
|
|
+
|
|
|
+ else -> {
|
|
|
+ "x${max(1, num)}(${getCompatString(R.string.operation_days, days)})"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //礼物在包裹能展示
|
|
|
+ if (issueToPackage == 1) {
|
|
|
+ "${getCompatString(R.string.commonui_count, rewardNum)} x${max(1, num)}"
|
|
|
+ } else {
|
|
|
+ getCompatString(R.string.commonui_count, rewardNum * max(1, num))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
fun getResourceTypeName(): String? {
|
|
|
return ProductTypeConstant.getNameBy(rewardResourceType)
|
|
|
}
|