小遊戲提醒

This commit is contained in:
18401019693 2023-10-26 14:42:09 +08:00
parent 192b0cb417
commit b191dfb1be
10 changed files with 237 additions and 14 deletions

View File

@ -37,6 +37,17 @@ public class EnterRoomNewModel extends BaseModel {
private String sudGameRoomStatus;
@SerializedName("sud_game_room_name")
private String sudGameRoomName;
@SerializedName("sud_gameDate")
private SudGameDateModel sudGameDateModel;
public SudGameDateModel getSudGameDateModel() {
return sudGameDateModel;
}
public EnterRoomNewModel setSudGameDateModel(SudGameDateModel sudGameDateModel) {
this.sudGameDateModel = sudGameDateModel;
return this;
}
public String getSudGameRoomName() {
return sudGameRoomName;

View File

@ -0,0 +1,175 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class SudGameDateModel extends BaseModel{
@SerializedName("room_holder_id")
private String roomHolderId;
@SerializedName("sex")
private String sex;
@SerializedName("golden_bean_number")
private String goldenBeanNumber;
@SerializedName("room_holder_type")
private String roomHolderType;
@SerializedName("sud_game_id")
private String sudGameId;
@SerializedName("room_status")
private String roomStatus;
@SerializedName("sud_game_name")
private String sudGameName;
@SerializedName("room_name")
private String roomName;
@SerializedName("player_total")
private String playerTotal;
@SerializedName("sud_game_icon")
private String sudGameIcon;
@SerializedName("room_holder_name")
private String roomHolderName;
@SerializedName("sud_game_room_id")
private String sudGameRoomId;
@SerializedName("ob_total")
private String obTotal;
@SerializedName("avatar")
private String avatar;
@SerializedName("liveuid")
private String liveuid;
public String getRoomHolderId() {
return roomHolderId;
}
public SudGameDateModel setRoomHolderId(String roomHolderId) {
this.roomHolderId = roomHolderId;
return this;
}
public String getSex() {
return sex;
}
public SudGameDateModel setSex(String sex) {
this.sex = sex;
return this;
}
public String getGoldenBeanNumber() {
return goldenBeanNumber;
}
public SudGameDateModel setGoldenBeanNumber(String goldenBeanNumber) {
this.goldenBeanNumber = goldenBeanNumber;
return this;
}
public String getRoomHolderType() {
return roomHolderType;
}
public SudGameDateModel setRoomHolderType(String roomHolderType) {
this.roomHolderType = roomHolderType;
return this;
}
public String getSudGameId() {
return sudGameId;
}
public SudGameDateModel setSudGameId(String sudGameId) {
this.sudGameId = sudGameId;
return this;
}
public String getRoomStatus() {
return roomStatus;
}
public SudGameDateModel setRoomStatus(String roomStatus) {
this.roomStatus = roomStatus;
return this;
}
public String getSudGameName() {
return sudGameName;
}
public SudGameDateModel setSudGameName(String sudGameName) {
this.sudGameName = sudGameName;
return this;
}
public String getRoomName() {
return roomName;
}
public SudGameDateModel setRoomName(String roomName) {
this.roomName = roomName;
return this;
}
public String getPlayerTotal() {
return playerTotal;
}
public SudGameDateModel setPlayerTotal(String playerTotal) {
this.playerTotal = playerTotal;
return this;
}
public String getSudGameIcon() {
return sudGameIcon;
}
public SudGameDateModel setSudGameIcon(String sudGameIcon) {
this.sudGameIcon = sudGameIcon;
return this;
}
public String getRoomHolderName() {
return roomHolderName;
}
public SudGameDateModel setRoomHolderName(String roomHolderName) {
this.roomHolderName = roomHolderName;
return this;
}
public String getSudGameRoomId() {
return sudGameRoomId;
}
public SudGameDateModel setSudGameRoomId(String sudGameRoomId) {
this.sudGameRoomId = sudGameRoomId;
return this;
}
public String getObTotal() {
return obTotal;
}
public SudGameDateModel setObTotal(String obTotal) {
this.obTotal = obTotal;
return this;
}
public String getAvatar() {
return avatar;
}
public SudGameDateModel setAvatar(String avatar) {
this.avatar = avatar;
return this;
}
public String getLiveuid() {
return liveuid;
}
public SudGameDateModel setLiveuid(String liveuid) {
this.liveuid = liveuid;
return this;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@ -9,9 +9,9 @@ ext {
]
manifestPlaceholders = [
//
serverHost : "https://napi.yaoulive.com",
// serverHost : "https://napi.yaoulive.com",
//
// serverHost : " https://ceshi.yaoulive.com",
serverHost : " https://ceshi.yaoulive.com",

View File

@ -777,9 +777,9 @@ public class LiveAudienceActivity extends LiveActivity {
@Subscribe(threadMode = ThreadMode.MAIN)
public void onLiveRoomChangeEvent(LiveRoomChangeEvent e) {
if (manager!=null&&manager.getsudGameMin()){
ToastUtil.show(WordUtil.isNewZh()?"小遊戲進行中,無法切換直播間":"Game in progress, unable to switch to live room");
}else {
if (manager != null && manager.getsudGameMin()) {
ToastUtil.show(WordUtil.isNewZh() ? "小遊戲進行中,無法切換直播間" : "Game in progress, unable to switch to live room");
} else {
LiveBean liveBean = e.getLiveBean();
if (TextUtils.equals(mLiveUid, liveBean.getUid())) {
ToastUtil.show(mContext.getString(R.string.current_live_room));
@ -808,7 +808,6 @@ public class LiveAudienceActivity extends LiveActivity {
}
}
@Override
@ -1542,7 +1541,7 @@ public class LiveAudienceActivity extends LiveActivity {
break;
case SUD_GAME_CREATE_ROOM:
if (manager != null) {
manager.setSudName(event.getAvatar());
manager.setSudName(event.getAvatar(), event.getCreateSudRoomModel());
}
break;

View File

@ -5,11 +5,13 @@ import com.yunbao.common.bean.ActiveModel;
import com.yunbao.common.bean.AiAutomaticSpeechModel;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.CreateSudRoomModel;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.MsgModel;
import com.yunbao.common.bean.OlineUserlistModel;
import com.yunbao.common.bean.RedPacketInfoModel;
import com.yunbao.common.bean.RedPacketModel;
import com.yunbao.common.bean.SudGameDateModel;
import com.yunbao.common.bean.WishModel;
import com.yunbao.common.bean.XydCompleteModel;
import com.yunbao.common.event.AllServerNotifyEvent;
@ -56,6 +58,25 @@ public class LiveAudienceEvent extends BaseModel {
private boolean isPk;
public String mStream;
public String mLiveUid, giftId;
public SudGameDateModel createSudRoomModel;
public SudGameDateModel getCreateSudRoomModel() {
return createSudRoomModel;
}
public LiveAudienceEvent setCreateSudRoomModel(SudGameDateModel createSudRoomModel) {
this.createSudRoomModel = createSudRoomModel;
return this;
}
public boolean isContactGift() {
return isContactGift;
}
public LiveAudienceEvent setContactGift(boolean contactGift) {
isContactGift = contactGift;
return this;
}
public String getGiftId() {
return giftId;

View File

@ -31,6 +31,7 @@ import com.yunbao.common.bean.PkRankBean;
import com.yunbao.common.bean.RedPacketInfoModel;
import com.yunbao.common.bean.RedPacketModel;
import com.yunbao.common.bean.SocketModel;
import com.yunbao.common.bean.SudGameDateModel;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.bean.WishModel;
import com.yunbao.common.bean.XydCompleteModel;
@ -753,7 +754,8 @@ public class SocketRyClient {
case "SudGameCreateRoom":
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.SUD_GAME_CREATE_ROOM)
.setAvatar(map.getString("room_name")));
.setAvatar(map.getString("room_name"))
.setCreateSudRoomModel(GsonUtils.fromJson(map.toString(), SudGameDateModel.class)));
break;
}

View File

@ -67,6 +67,7 @@ import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.AiAutomaticSpeechModel;
import com.yunbao.common.bean.BannerBean;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.CreateSudRoomModel;
import com.yunbao.common.bean.FansCheckRed;
import com.yunbao.common.bean.GiftModel;
import com.yunbao.common.bean.GuardUserModel;
@ -90,6 +91,7 @@ import com.yunbao.common.bean.RedPacketInfoModel;
import com.yunbao.common.bean.RedPacketModel;
import com.yunbao.common.bean.RewardAllModel;
import com.yunbao.common.bean.StarChallengeStatusModel;
import com.yunbao.common.bean.SudGameDateModel;
import com.yunbao.common.bean.TaskModel;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.bean.WishModel;
@ -128,6 +130,7 @@ import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.utils.formatBigNum;
import com.yunbao.common.views.AbsViewHolder;
import com.yunbao.common.views.LiveSudGamePopup;
import com.yunbao.common.views.weight.ClipPathCircleImage;
import com.yunbao.common.views.weight.FullServiceNotificationView;
import com.yunbao.common.views.weight.NobleNoticeView;
@ -647,7 +650,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
};
public void setSudName(String sudName) {
public void setSudName(String sudName, SudGameDateModel sudGameDateModel) {
sud_text_name = (TextView) findViewById(R.id.sud_text_name);
sud_layout_name = (LinearLayout) findViewById(R.id.sud_layout_name);
sud_text_name.setText(WordUtil.isNewZh() ?
@ -657,7 +660,18 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
ViewClicksAntiShake.clicksAntiShake(sud_layout_name, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
sud_layout_name.setVisibility(View.GONE);
CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel();
createSudRoomModel.setSudGameId(sudGameDateModel.getSudGameId());
createSudRoomModel.setSudGameRoomId(sudGameDateModel.getSudGameRoomId());
createSudRoomModel.setAvatar(sudGameDateModel.getAvatar());
createSudRoomModel.setRoomName(sudGameDateModel.getRoomName());
createSudRoomModel.setSudGameName(sudGameDateModel.getSudGameName());
new XPopup.Builder(mContext)
.enableDrag(false)
.dismissOnTouchOutside(false)
.dismissOnBackPressed(false)
.asCustom(new LiveSudGamePopup(mContext, createSudRoomModel))
.show();
}
});
sudNameHandler.removeCallbacks(sudNameRunnable);

View File

@ -45,6 +45,7 @@ import com.yunbao.common.bean.MsgModel;
import com.yunbao.common.bean.RedPacketInfoModel;
import com.yunbao.common.bean.RedPacketModel;
import com.yunbao.common.bean.StarChallengeStatusModel;
import com.yunbao.common.bean.SudGameDateModel;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.bean.WishModel;
import com.yunbao.common.bean.XydCompleteModel;
@ -721,7 +722,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.hindeRedPacket();
}
if (TextUtils.equals(data.getSudGameRoomStatus(), "1")) {
mLiveRoomViewHolder.setSudName(data.getSudGameRoomName());
mLiveRoomViewHolder.setSudName(data.getSudGameRoomName(), data.getSudGameDateModel());
}
}
@ -1968,9 +1969,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
}
}
public void setSudName(String sudName) {
public void setSudName(String sudName, SudGameDateModel sudGameDateModel) {
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.setSudName(sudName);
mLiveRoomViewHolder.setSudName(sudName, sudGameDateModel);
}
}

View File

@ -2500,7 +2500,7 @@
android:scrollHorizontally="true"
android:singleLine="true"
android:text="主播創建了【游戲名】房間,快來與主播同玩~"
android:textColor="@color/black3"
android:textColor="@color/white"
android:textSize="14sp"
/>
</LinearLayout>