添加飘屏和访客功能
This commit is contained in:
@@ -212,8 +212,8 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
tzblChanged();
|
||||
RoomPitBean roomPitBean2 = wheatView.pitBean;
|
||||
if (roomPitBean2 != null && roomPitBean2.getUser_id() != null && !roomPitBean2.getUser_id().equals("0")){
|
||||
if (roomPitBean2.getUser_id().equals(SpUtil.getUserId() + "")){
|
||||
if (roomPitBean2 != null && roomPitBean2.getUser_id() != null && !roomPitBean2.getUser_id().equals("0")) {
|
||||
if (roomPitBean2.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
imActionJs.setVisibility(VISIBLE);
|
||||
imActionYs.setVisibility(VISIBLE);
|
||||
} else {
|
||||
@@ -244,8 +244,8 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
}
|
||||
|
||||
if (auctionUserBean!=null && auctionUserBean.getUser_id()!=null && !auctionUserBean.getUser_id().equals("0")){
|
||||
if (userIds.length() > 0){
|
||||
if (auctionUserBean != null && auctionUserBean.getUser_id() != null && !auctionUserBean.getUser_id().equals("0")) {
|
||||
if (userIds.length() > 0) {
|
||||
userIds.append(",");
|
||||
}
|
||||
userIds.append(auctionUserBean.getUser_id());
|
||||
@@ -278,14 +278,35 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
private void onChock(View view) {
|
||||
int id = view.getId();
|
||||
if (id == R.id.iv_jp) {
|
||||
UserInfo userInfo = new UserInfo();
|
||||
userInfo.setUser_id(Integer.parseInt(roomInfoResp.getRoom_auction().getAuction_user().getUser_id()));
|
||||
userInfo.setNickname(roomInfoResp.getRoom_auction().getAuction_user().getNickname());
|
||||
userInfo.setAvatar(roomInfoResp.getRoom_auction().getAuction_user().getAvatar());
|
||||
userInfo.setAuction_id(roomInfoResp.getRoom_auction().getAuction_user().getAuction_id());
|
||||
userInfo.setPit_number("888");
|
||||
RoomGiftDialogFragment.show(null, userInfo, roomInfoResp.getRoom_info().getRoom_id(), 1, getParentFragmentManager());
|
||||
// 添加多层空值检查
|
||||
if (roomInfoResp != null &&
|
||||
roomInfoResp.getRoom_auction() != null &&
|
||||
roomInfoResp.getRoom_auction().getAuction_user() != null &&
|
||||
roomInfoResp.getRoom_auction().getAuction_user().getUser_id() != null &&
|
||||
!roomInfoResp.getRoom_auction().getAuction_user().getUser_id().isEmpty()) {
|
||||
|
||||
try {
|
||||
UserInfo userInfo = new UserInfo();
|
||||
userInfo.setUser_id(Integer.parseInt(roomInfoResp.getRoom_auction().getAuction_user().getUser_id()));
|
||||
userInfo.setNickname(roomInfoResp.getRoom_auction().getAuction_user().getNickname());
|
||||
userInfo.setAvatar(roomInfoResp.getRoom_auction().getAuction_user().getAvatar());
|
||||
userInfo.setAuction_id(roomInfoResp.getRoom_auction().getAuction_user().getAuction_id());
|
||||
userInfo.setPit_number("888");
|
||||
|
||||
if (roomInfoResp.getRoom_info() != null &&
|
||||
roomInfoResp.getRoom_info().getRoom_id() != null) {
|
||||
RoomGiftDialogFragment.show(null, userInfo, roomInfoResp.getRoom_info().getRoom_id(), 1, getParentFragmentManager());
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
LogUtils.e("NumberFormatException in parsing user_id: " + e.getMessage());
|
||||
ToastUtils.show("数据解析错误");
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("Error showing gift dialog: " + e.getMessage());
|
||||
ToastUtils.show("操作失败");
|
||||
}
|
||||
} else {
|
||||
ToastUtils.show("拍卖信息不存在");
|
||||
}
|
||||
} else if (id == R.id.room_make_wheat) {
|
||||
if (!wheatView.getUserId().equals("")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), wheatView.getUserId(), wheatView.pitNumber, getHostUser(), false, 1, 0, getChildFragmentManager());
|
||||
@@ -560,14 +581,14 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
@Override
|
||||
public void userOnlineStatus(List<UserOnlineStatusBean> list) {
|
||||
// RoomMakeWheatView wheatView = mBinding.roomMakeWheat;
|
||||
RoomPitBean pitBean= wheatView.pitBean;
|
||||
RoomPitBean pitBean2= wheatView2.pitBean;
|
||||
RoomPitBean pitBean = wheatView.pitBean;
|
||||
RoomPitBean pitBean2 = wheatView2.pitBean;
|
||||
|
||||
for (UserOnlineStatusBean bean : list) {
|
||||
if (pitBean!=null && pitBean.getUser_id() != null && bean.getUser_id().equals(pitBean.getUser_id())) {
|
||||
if (pitBean != null && pitBean.getUser_id() != null && bean.getUser_id().equals(pitBean.getUser_id())) {
|
||||
wheatView.setOnlineStatus(bean);
|
||||
}
|
||||
if (pitBean2!=null && pitBean2.getUser_id() != null && bean.getUser_id().equals(pitBean2.getUser_id())) {
|
||||
if (pitBean2 != null && pitBean2.getUser_id() != null && bean.getUser_id().equals(pitBean2.getUser_id())) {
|
||||
wheatView2.setOnlineStatus(bean);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1321,4 +1321,11 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
// ); // 取较小值
|
||||
dialog.getWindow().setAttributes(lp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
mBinding.flexboxLayout.removeAllViews();
|
||||
mBinding.flexboxLayout2.removeAllViews();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user