1:修改房间离线展示
This commit is contained in:
@@ -92,6 +92,7 @@ public class UserInfo extends BaseEvent implements Serializable {
|
||||
private String sign_id;
|
||||
|
||||
private Master master;
|
||||
private int is_online;//是否在线 : 1在线 2离线
|
||||
|
||||
@Data
|
||||
public static class Master implements Serializable {
|
||||
|
||||
@@ -179,10 +179,15 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
setCardiac(pitBean.getCharm(), getTzbl());
|
||||
|
||||
if (bean.getUser_id() != null && !bean.getUser_id().equals("0") && !bean.getUser_id().isEmpty()) {
|
||||
if (CommonAppContext.getInstance().getOnlineMap() != null && CommonAppContext.getInstance().getOnlineMap().get(bean.getUser_id()) != null) {
|
||||
iv_on_line.setVisibility(CommonAppContext.getInstance().getOnlineMap().get(bean.getUser_id()) == 1 ? GONE : VISIBLE);
|
||||
} else {
|
||||
// if (CommonAppContext.getInstance().getOnlineMap() != null && CommonAppContext.getInstance().getOnlineMap().get(bean.getUser_id()) != null) {
|
||||
// iv_on_line.setVisibility(CommonAppContext.getInstance().getOnlineMap().get(bean.getUser_id()) == 1 ? GONE : VISIBLE);
|
||||
// } else {
|
||||
// iv_on_line.setVisibility(GONE);
|
||||
// }
|
||||
if (bean.getIs_online()== 1) {
|
||||
iv_on_line.setVisibility(GONE);
|
||||
}else {
|
||||
iv_on_line.setVisibility(VISIBLE);
|
||||
}
|
||||
} else {
|
||||
iv_on_line.setVisibility(GONE);
|
||||
@@ -424,10 +429,15 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
|
||||
public void setOnlineStatus() {
|
||||
if (pitBean.getUser_id() != null && !pitBean.getUser_id().equals("0") && !pitBean.getUser_id().isEmpty()) {
|
||||
if (CommonAppContext.getInstance().getOnlineMap() != null && CommonAppContext.getInstance().getOnlineMap().get(pitBean.getUser_id()) != null) {
|
||||
iv_on_line.setVisibility(CommonAppContext.getInstance().getOnlineMap().get(pitBean.getUser_id()) == 1 ? GONE : VISIBLE);
|
||||
} else {
|
||||
// if (CommonAppContext.getInstance().getOnlineMap() != null && CommonAppContext.getInstance().getOnlineMap().get(pitBean.getUser_id()) != null) {
|
||||
// iv_on_line.setVisibility(CommonAppContext.getInstance().getOnlineMap().get(pitBean.getUser_id()) == 1 ? GONE : VISIBLE);
|
||||
// } else {
|
||||
// iv_on_line.setVisibility(GONE);
|
||||
// }
|
||||
if(pitBean.getIs_online()==1){
|
||||
iv_on_line.setVisibility(GONE);
|
||||
}else {
|
||||
iv_on_line.setVisibility(VISIBLE);
|
||||
}
|
||||
} else {
|
||||
iv_on_line.setVisibility(GONE);
|
||||
|
||||
@@ -74,7 +74,7 @@ public class RoomSingSongWheat2View extends BaseWheatView {
|
||||
updateSexIcon();
|
||||
// updateCharmViewVisibility(bean);
|
||||
updatePkState(bean);
|
||||
iv_on_line.setVisibility(GONE);
|
||||
// iv_on_line.setVisibility(GONE);
|
||||
}
|
||||
|
||||
private void handleOnState(RoomPitBean bean) {
|
||||
|
||||
@@ -71,7 +71,7 @@ public class RoomSingSongWheatView extends BaseWheatView {
|
||||
|
||||
updateSexIcon();
|
||||
updatePkState(bean);
|
||||
iv_on_line.setVisibility(GONE);
|
||||
// iv_on_line.setVisibility(GONE);
|
||||
}
|
||||
|
||||
private void handleOnState(RoomPitBean bean) {
|
||||
|
||||
Reference in New Issue
Block a user