UI 优化。

This commit is contained in:
2026-01-08 17:24:52 +08:00
parent e74bfde545
commit e12bb36fe5
2 changed files with 14 additions and 12 deletions

View File

@@ -84,14 +84,15 @@ class RoomPubFragment(var mRoomInfoResp: RoomInfoResp?) :
timer.timeLeft.collect { time ->
viewList.forEach { it ->
if (it.pitNumber != "9" && it.pitNumber != "10") {
if (!TextUtils.isEmpty(it.pitBean.user_id) && !it.pitBean.user_id.equals("0")) {
val time =
it.pitBean.end_time.toLong() * 1000 - System.currentTimeMillis()
if (!TextUtils.isEmpty(it.pitBean.user_id) && !it.pitBean.user_id.equals("0") && !TextUtils.isEmpty(it.pitBean.end_time)) {
val time = it.pitBean.end_time.toLong() * 1000 - System.currentTimeMillis()
if (time <= 0) {
it.setTime("00:00")
} else {
it.setTime(timer.formatTime2(time))
}
} else {
it.setTime("00:00")
}
}
}
@@ -123,6 +124,7 @@ class RoomPubFragment(var mRoomInfoResp: RoomInfoResp?) :
for ((idx, view) in viewList.withIndex()) {
if (mRoomInfoResp?.room_info?.pit_list!!.size > indexList[idx].toInt() - 1) {
view.setRoomWheatNumber(indexList[idx])
view.isMentorShip(true)
val bean = mRoomInfoResp?.room_info?.pit_list!![indexList[idx].toInt() - 1]
view.setData(bean)