[BugFix]个播房隐藏金币明细
This commit is contained in:
@@ -492,7 +492,7 @@ class RoomEffectBoxView @JvmOverloads constructor(
|
||||
ForegroundColorSpan(resources.getColor(R.color.notice_nick))
|
||||
)
|
||||
.append(
|
||||
ResUtil.getString(R.string.avroom_widget_roomeffectview_012) + attachment.boxTypeStr + ResUtil.getString(
|
||||
ResUtil.getString(R.string.treasure_in_find_love) + ResUtil.getString(
|
||||
R.string.avroom_widget_roomeffectview_013
|
||||
), ForegroundColorSpan(Color.WHITE)
|
||||
)
|
||||
|
@@ -36,7 +36,6 @@ import com.yizhuan.erban.ui.utils.isDestroyed
|
||||
import com.yizhuan.erban.ui.utils.load
|
||||
import com.yizhuan.erban.ui.utils.loadAnim
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity
|
||||
import com.yizhuan.erban.ui.webview.DialogWebViewActivity
|
||||
import com.yizhuan.erban.ui.widget.SimpleAnimListener
|
||||
import com.yizhuan.erban.ui.widget.drawgift.DrawGiftPlayHelper
|
||||
import com.yizhuan.erban.utils.MsgBuilder
|
||||
@@ -665,41 +664,49 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
svgaImageView.layoutParams = params
|
||||
svgaImageView.callback = object : SimpleSvgaCallback() {
|
||||
override fun onFinished() {
|
||||
binding.flSvgaLuckySeaNotify.post { binding.flSvgaLuckySeaNotify.removeView(svgaImageView) }
|
||||
binding.flSvgaLuckySeaNotify.post {
|
||||
binding.flSvgaLuckySeaNotify.removeView(
|
||||
svgaImageView
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
binding.flSvgaLuckySeaNotify.addView(svgaImageView)
|
||||
shareParser().decodeFromAssets("svga/lucky_sea_notify.svga", object : SVGAParser.ParseCompletion {
|
||||
override fun onComplete(videoItem: SVGAVideoEntity) {
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
val textPaint = TextPaint()
|
||||
textPaint.color = Color.WHITE //字體顏色
|
||||
textPaint.textSize = 24f //字體大小
|
||||
dynamicEntity.setDynamicText(
|
||||
StaticLayout(
|
||||
text.build(),
|
||||
0,
|
||||
text.build().length,
|
||||
textPaint,
|
||||
0,
|
||||
Layout.Alignment.ALIGN_CENTER,
|
||||
1.0f,
|
||||
0.0f,
|
||||
false
|
||||
), "noble_text_tx"
|
||||
)
|
||||
svgaImageView.setOnClickListener {
|
||||
if(!TextUtils.isEmpty(bean.skipUrl)) {
|
||||
CommonWebViewActivity.start(mContext, bean.skipUrl)
|
||||
shareParser().decodeFromAssets(
|
||||
"svga/lucky_sea_notify.svga",
|
||||
object : SVGAParser.ParseCompletion {
|
||||
override fun onComplete(videoItem: SVGAVideoEntity) {
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
val textPaint = TextPaint()
|
||||
textPaint.color = Color.WHITE //字體顏色
|
||||
textPaint.textSize = 24f //字體大小
|
||||
dynamicEntity.setDynamicText(
|
||||
StaticLayout(
|
||||
text.build(),
|
||||
0,
|
||||
text.build().length,
|
||||
textPaint,
|
||||
0,
|
||||
Layout.Alignment.ALIGN_CENTER,
|
||||
1.0f,
|
||||
0.0f,
|
||||
false
|
||||
), "noble_text_tx"
|
||||
)
|
||||
svgaImageView.setOnClickListener {
|
||||
if (!TextUtils.isEmpty(bean.skipUrl)) {
|
||||
CommonWebViewActivity.start(mContext, bean.skipUrl)
|
||||
}
|
||||
}
|
||||
val drawable = SVGADrawable(videoItem, dynamicEntity)
|
||||
svgaImageView.setImageDrawable(drawable)
|
||||
svgaImageView.stepToFrame(0, true)
|
||||
}
|
||||
val drawable = SVGADrawable(videoItem, dynamicEntity)
|
||||
svgaImageView.setImageDrawable(drawable)
|
||||
svgaImageView.stepToFrame(0, true)
|
||||
}
|
||||
|
||||
override fun onError() {}
|
||||
}, null)
|
||||
override fun onError() {}
|
||||
},
|
||||
null
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -795,7 +802,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
ForegroundColorSpan(resources.getColor(R.color.notice_nick))
|
||||
)
|
||||
.append(
|
||||
ResUtil.getString(R.string.avroom_widget_roomeffectview_012) + attachment.boxTypeStr + ResUtil.getString(
|
||||
ResUtil.getString(R.string.treasure_in_find_love) + ResUtil.getString(
|
||||
R.string.avroom_widget_roomeffectview_013
|
||||
), ForegroundColorSpan(Color.WHITE)
|
||||
)
|
||||
|
@@ -9,6 +9,10 @@ import java.util.*
|
||||
|
||||
class EarnRecordViewModel : BaseViewModel() {
|
||||
|
||||
//是否个播
|
||||
private val _queryRoomTypeLiveData = MutableLiveData<RoomTypeInfo?>()
|
||||
val queryRoomTypeLiveData: MutableLiveData<RoomTypeInfo?> = _queryRoomTypeLiveData
|
||||
|
||||
//收益记录
|
||||
private val _earnRecordLiveData = MutableLiveData<EarnRecordInfo?>()
|
||||
val earnRecordLiveData: MutableLiveData<EarnRecordInfo?> = _earnRecordLiveData
|
||||
@@ -92,6 +96,18 @@ class EarnRecordViewModel : BaseViewModel() {
|
||||
mWeekChooseDay = weekChooseDay
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否个播
|
||||
*/
|
||||
fun queryWithRoomType() {
|
||||
safeLaunch(
|
||||
false,
|
||||
block = {
|
||||
_queryRoomTypeLiveData.value = EarnModel.queryWithRoomType()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 收益记录
|
||||
*/
|
||||
|
@@ -44,8 +44,23 @@ class EarnRecordActivity : BaseViewBindingActivity<ActivityEarnRecordBinding>(),
|
||||
else dialogManager.dismissDialog()
|
||||
}
|
||||
|
||||
earnRecordModel.earnRecordLiveData.observe(this) {
|
||||
earnRecordModel.goldToDiamondLiveData.observe(this) {
|
||||
it?.let {
|
||||
ConvertDiamondActivity.start(this, it)
|
||||
}
|
||||
}
|
||||
|
||||
earnRecordModel.getConfigWithdrawLiveData.observe(this) {
|
||||
it?.let {
|
||||
EarnWithdrawActivity.start(this, it)
|
||||
}
|
||||
}
|
||||
|
||||
earnRecordModel.queryRoomTypeLiveData.observe(this) {
|
||||
it?.let {
|
||||
if (it.roomType == 4) {
|
||||
binding.csGoldBg.visibility = View.GONE
|
||||
}
|
||||
binding.tvDiamondNum.text = String.format(it.diamonds.toString())
|
||||
binding.tvGoldNum.text = String.format(it.golds.toString())
|
||||
if (it.isClanElder) {
|
||||
@@ -66,23 +81,11 @@ class EarnRecordActivity : BaseViewBindingActivity<ActivityEarnRecordBinding>(),
|
||||
}
|
||||
}
|
||||
|
||||
earnRecordModel.goldToDiamondLiveData.observe(this) {
|
||||
it?.let {
|
||||
ConvertDiamondActivity.start(this, it)
|
||||
}
|
||||
}
|
||||
|
||||
earnRecordModel.getConfigWithdrawLiveData.observe(this) {
|
||||
it?.let {
|
||||
EarnWithdrawActivity.start(this, it)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
earnRecordModel.getEarnRecordInfo()
|
||||
earnRecordModel.queryWithRoomType()
|
||||
}
|
||||
|
||||
fun initListener() {
|
||||
|
@@ -0,0 +1,16 @@
|
||||
package com.yizhuan.xchat_android_core.earn.bean
|
||||
|
||||
import java.math.BigDecimal
|
||||
|
||||
data class RoomTypeInfo(
|
||||
val uid: Long,
|
||||
val diamonds: BigDecimal,
|
||||
val crystals: Double,
|
||||
val golds: BigDecimal,
|
||||
val isClan: Boolean = false,
|
||||
val isClanElder: Boolean = false,
|
||||
val hasGoldExchangeAuth: Boolean = false,
|
||||
val sendGold: Boolean = false,
|
||||
val hasPaymentPwd: Boolean = false,
|
||||
val roomType: Int,
|
||||
)
|
@@ -14,6 +14,11 @@ object EarnModel : BaseModel() {
|
||||
|
||||
private val api = RxNet.create(Api::class.java)
|
||||
|
||||
suspend fun queryWithRoomType(): RoomTypeInfo? =
|
||||
launchRequest {
|
||||
api.queryWithRoomType()
|
||||
}
|
||||
|
||||
suspend fun getEarnRecord(): EarnRecordInfo? =
|
||||
launchRequest {
|
||||
api.getEarnRecordInfo()
|
||||
@@ -80,6 +85,12 @@ object EarnModel : BaseModel() {
|
||||
|
||||
private interface Api {
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
@GET("/purse/queryWithRoomType")
|
||||
suspend fun queryWithRoomType(): ServiceResult<RoomTypeInfo>
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
|
Reference in New Issue
Block a user