1:修改拍卖房出现报错信息
This commit is contained in:
@@ -2126,21 +2126,31 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
|
||||
private fun handleMsgType1024(messageEvent: RoomMessageEvent, text: T?) {
|
||||
if (text == null || mRoomInfoResp == null || mRoomInfoResp!!.room_auction == null) return
|
||||
if (mRoomInfoResp!!.room_auction.auction_list != null) {
|
||||
mRoomInfoResp!!.room_auction.auction_list.clear()
|
||||
if (text == null || mRoomInfoResp == null || mRoomInfoResp!!.room_info == null) return
|
||||
|
||||
try {
|
||||
// 初始化 room_auction 如果为 null
|
||||
if (mRoomInfoResp!!.room_auction == null) {
|
||||
mRoomInfoResp!!.room_auction = RoomAuction()
|
||||
}
|
||||
|
||||
// 安全地处理 auction_list
|
||||
val auctionList = mRoomInfoResp!!.room_auction.auction_list ?: ArrayList()
|
||||
auctionList.clear()
|
||||
|
||||
// 安全地添加新数据
|
||||
text.auction_list?.let { auctionList.addAll(it) }
|
||||
|
||||
mRoomInfoResp!!.room_auction.auction_list = auctionList
|
||||
|
||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||
roomFragment!!.handleAuctionMessageEvent(messageEvent)
|
||||
} catch (e: Exception) {
|
||||
LogUtils.e("handleMsgType1024 error: " + e.message)
|
||||
}
|
||||
if (mRoomInfoResp!!.room_auction.auction_list != null) {
|
||||
mRoomInfoResp!!.room_auction.auction_list.addAll(text.auction_list)
|
||||
} else {
|
||||
mRoomInfoResp!!.room_auction.auction_list = ArrayList()
|
||||
// mRoomInfoResp.getRoom_auction().getAuction_list().addAll(text.getAuction_list());
|
||||
}
|
||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||
roomFragment!!.handleAuctionMessageEvent(messageEvent)
|
||||
// roomFragment.updateSeatViewExchangedWithPitArray(mRoomInfoResp);
|
||||
}
|
||||
|
||||
|
||||
private fun handleMsgType1020(messageEvent: RoomMessageEvent, text: T?) {
|
||||
if (text == null) return
|
||||
|
||||
|
||||
@@ -72,11 +72,32 @@ public class CustomCenterDialogFragment extends DialogFragment {
|
||||
|
||||
fragment.show(fragmentManager, "CustomCenterDialogFragment");
|
||||
|
||||
// new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
// if (fragment.isAdded()) {
|
||||
// fragment.dismiss();
|
||||
// }
|
||||
// }, 4000); // 4秒后关闭
|
||||
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
if (fragment != null && fragment.isAdded()) {
|
||||
fragment.dismiss();
|
||||
try {
|
||||
if (fragment.isAdded() &&
|
||||
!fragment.isRemoving() &&
|
||||
!fragment.isDetached() &&
|
||||
fragment.getActivity() != null &&
|
||||
!fragment.getActivity().isFinishing() &&
|
||||
!fragment.getActivity().isDestroyed()) {
|
||||
|
||||
if (fragment.getFragmentManager() != null && !fragment.getFragmentManager().isStateSaved()) {
|
||||
fragment.dismiss();
|
||||
} else {
|
||||
fragment.dismissAllowingStateLoss();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 安全地忽略异常
|
||||
}
|
||||
}, 4000); // 4秒后关闭
|
||||
|
||||
}
|
||||
|
||||
public void setAnimationStyle(int animStyle) {
|
||||
|
||||
Reference in New Issue
Block a user