解决返回的时间秒数格式不对引起查看CP邀请时候的闪退问题
This commit is contained in:
@@ -6,10 +6,10 @@ import com.yizhuan.xchat_android_core.relation.cp.UserCpListEntity
|
|||||||
object CpDataParser {
|
object CpDataParser {
|
||||||
fun inviteMsg2cpListEntity(msgEntity: CpInviteInfo) = UserCpListEntity(
|
fun inviteMsg2cpListEntity(msgEntity: CpInviteInfo) = UserCpListEntity(
|
||||||
msgEntity.acceptUid, msgEntity.acceptAvatar, msgEntity.acceptNick,
|
msgEntity.acceptUid, msgEntity.acceptAvatar, msgEntity.acceptNick,
|
||||||
msgEntity.acceptGender, msgEntity.replyExpireTime.toString(), msgEntity.declaration,
|
msgEntity.acceptGender, msgEntity.replyExpireTime.toLong(), msgEntity.declaration,
|
||||||
msgEntity.cpId, msgEntity.inviteUid, msgEntity.inviteAvatar, msgEntity.inviteNick,
|
msgEntity.cpId,msgEntity.replyExpireTime,0, msgEntity.inviteUid, msgEntity.inviteAvatar, msgEntity.inviteNick,
|
||||||
msgEntity.inviteGender, 0, msgEntity.propsId, msgEntity.propsImg,
|
msgEntity.inviteGender, 0, msgEntity.propsId, msgEntity.propsImg,
|
||||||
msgEntity.propsName, msgEntity.propsPrice, 0, 0, msgEntity.replyExpireTime.toString()
|
msgEntity.propsName, msgEntity.propsPrice, 0, 0, msgEntity.replyExpireTime.toLong()
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -47,7 +47,6 @@ class CpInviteReplyDialog(context: Context) :
|
|||||||
0,
|
0,
|
||||||
data.inviteUserNick.length
|
data.inviteUserNick.length
|
||||||
)
|
)
|
||||||
CpViewHelper.setInviteTimeRemain(data.updateTime, binding.tvTime)
|
|
||||||
CpViewHelper.setInviteGiftPriceStyle(context, data.propsPrice, binding.tvPrice)
|
CpViewHelper.setInviteGiftPriceStyle(context, data.propsPrice, binding.tvPrice)
|
||||||
binding.tvDeclaration.text = data.declaration
|
binding.tvDeclaration.text = data.declaration
|
||||||
ImageLoadUtilsV2.loadImage(binding.ivGift, cpInviteData?.propsImg)
|
ImageLoadUtilsV2.loadImage(binding.ivGift, cpInviteData?.propsImg)
|
||||||
@@ -70,8 +69,8 @@ class CpInviteReplyDialog(context: Context) :
|
|||||||
|
|
||||||
override fun onAttachedToWindow() {
|
override fun onAttachedToWindow() {
|
||||||
super.onAttachedToWindow()
|
super.onAttachedToWindow()
|
||||||
cpInviteData?.updateTime?.let {
|
cpInviteData?.replyExpireTime?.let {
|
||||||
countDown(it.toInt())
|
countDown(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5,9 +5,11 @@ data class UserCpListEntity(
|
|||||||
val acceptUserAvatar: String = "",
|
val acceptUserAvatar: String = "",
|
||||||
val acceptUserNick: String = "",
|
val acceptUserNick: String = "",
|
||||||
val acceptUserSex: Int = 0,//1-男 2女
|
val acceptUserSex: Int = 0,//1-男 2女
|
||||||
val createTime: String = "",
|
val createTime: Long=0,
|
||||||
val declaration: String = "",//关系誓言
|
val declaration: String = "",//关系誓言
|
||||||
val cpId: Int = 0,//邀请记录id
|
val cpId: Int = 0,//邀请记录id
|
||||||
|
val replyExpireTime: Int = 0,
|
||||||
|
val acceptTime:Long=0,
|
||||||
val inviteUid: Long = 0,//邀请人uid
|
val inviteUid: Long = 0,//邀请人uid
|
||||||
val inviteUserAvatar: String = "",//邀请方头像
|
val inviteUserAvatar: String = "",//邀请方头像
|
||||||
val inviteUserNick: String = "",
|
val inviteUserNick: String = "",
|
||||||
@@ -19,5 +21,5 @@ data class UserCpListEntity(
|
|||||||
val propsPrice: String = "",
|
val propsPrice: String = "",
|
||||||
val state: Int = 0,//状态:1-邀请中,2-CP中,3-拒绝,4-解绑中,5-解绑完成
|
val state: Int = 0,//状态:1-邀请中,2-CP中,3-拒绝,4-解绑中,5-解绑完成
|
||||||
val unboundUid: Int = 0,//解绑人
|
val unboundUid: Int = 0,//解绑人
|
||||||
val updateTime: String = ""
|
val updateTime: Long = 0
|
||||||
)
|
)
|
Reference in New Issue
Block a user