UI 优化。
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user