1:修改跳转房间出现roomId丢失的问题
2:修改红包列表上拉加载和下拉刷新 3:给签约房添加倒计时展示
This commit is contained in:
@@ -64,10 +64,12 @@ public class RedResultActivity extends BaseMvpActivity<RedEnvelopesPresenter, Fr
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull @NotNull RefreshLayout refreshLayout) {
|
||||
MvpPre.getRedpacketDetail(redpacketId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore(@NonNull @NotNull RefreshLayout refreshLayout) {
|
||||
MvpPre.getRedpacketDetail(redpacketId);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -83,6 +85,8 @@ public class RedResultActivity extends BaseMvpActivity<RedEnvelopesPresenter, Fr
|
||||
if (isFinishing() || isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
mBinding.smartRefreshLayout.finishLoadMore();
|
||||
mBinding.smartRefreshLayout.finishRefresh();
|
||||
if (redpacketDetail != null) {
|
||||
ImageUtils.loadHeadCC(redpacketDetail.getRedpacket_info().getAvatar(), mBinding.userAvatar);
|
||||
mBinding.userName.setText(redpacketDetail.getRedpacket_info().getNickname());
|
||||
|
||||
@@ -290,6 +290,7 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
|
||||
|
||||
mBinding.tvTimeRight.visibility = View.GONE
|
||||
mBinding.tvTime.visibility = View.GONE
|
||||
mBinding.tvJsq.visibility= View.GONE
|
||||
|
||||
mBinding.tvTimeLeft.visibility = View.GONE
|
||||
|
||||
@@ -350,12 +351,14 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
|
||||
fun roomInfoUpdate(mRoomInfoResp: RoomInfoResp) {
|
||||
mRoomInfo = mRoomInfoResp
|
||||
mUserInfo = mRoomInfo?.user_info
|
||||
mRoomId = mRoomInfo?.room_id!!
|
||||
showBtn()
|
||||
}
|
||||
|
||||
fun roomTypeSwitch(mRoomInfoResp: RoomInfoResp) {
|
||||
mRoomInfo = mRoomInfoResp
|
||||
mUserInfo = mRoomInfo?.user_info
|
||||
mRoomId = mRoomInfo?.room_id!!
|
||||
initView()
|
||||
}
|
||||
|
||||
@@ -503,6 +506,16 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
|
||||
// 观察时间变化
|
||||
scope.launch {
|
||||
timer.timeLeft.collect { time ->
|
||||
LogUtils.e("startTimer:"+time)
|
||||
if (time/1000 <= 10){
|
||||
mBinding.tvJsq.visibility= View.VISIBLE
|
||||
mBinding.tvJsq.text = (time/1000).toString()
|
||||
if ((time/1000).toInt() <= 0){
|
||||
mBinding.tvJsq.visibility= View.GONE
|
||||
}
|
||||
}else{
|
||||
mBinding.tvJsq.visibility= View.GONE
|
||||
}
|
||||
val formattedTime = timer.formatTime(time)
|
||||
// 更新UI显示
|
||||
updateTimerDisplay(formattedTime)
|
||||
|
||||
@@ -622,7 +622,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
// return;
|
||||
// }
|
||||
// } else {
|
||||
if (roonGiftModel == null|| roonGiftModel.getGift_id() == null) {
|
||||
if (roonGiftModel == null|| roonGiftModel.getGift_id() == null || !roonGiftModel.isChecked()) {
|
||||
ToastUtils.show("请选择礼物");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -348,6 +348,25 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_jsq"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:layout_marginBottom="@dimen/dp_90"
|
||||
android:background="@color/transparent"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="@dimen/dp_18"
|
||||
android:text="1"
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
android:textSize="90sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user