修改交友布局
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
/**
|
||||
* Created by http://www.yunbaokj.com on 2022/7/12.
|
||||
*/
|
||||
public class AppLifecycleEvent {
|
||||
|
||||
private boolean mFrontGround;
|
||||
|
||||
public AppLifecycleEvent(boolean frontGround) {
|
||||
mFrontGround = frontGround;
|
||||
}
|
||||
|
||||
public boolean isFrontGround() {
|
||||
return mFrontGround;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
/**
|
||||
* 项目名称 qipao-android
|
||||
* 包名:com.yutang.xqipao.data.even
|
||||
* 创建人 王欧
|
||||
* 创建时间 2020/7/18 9:42 AM
|
||||
* 描述 describe
|
||||
*/
|
||||
public class BossMsgEvent {
|
||||
public String msg;
|
||||
|
||||
public BossMsgEvent(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CabinEvent {
|
||||
private boolean joined;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/7/11
|
||||
*@description: 关闭屏幕共享
|
||||
*/
|
||||
public class ColoseCardEvent {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/23
|
||||
*@description: 特效设置
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EffectEvent {
|
||||
private boolean effectOn;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
public class GiftDoubleClickEvent {
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author lxj$
|
||||
* @Time 2025年7月30日01:35:52$ $
|
||||
* @Description 打赏成功$
|
||||
*/
|
||||
@Data
|
||||
public class GiftRewardEvent {
|
||||
private int points;
|
||||
|
||||
public GiftRewardEvent(int points) {
|
||||
this.points = points;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||
|
||||
public class GiftUserRefreshEvent {
|
||||
public boolean addSelf;
|
||||
|
||||
public int type;
|
||||
|
||||
public RoonGiftModel gift;
|
||||
|
||||
public GiftUserRefreshEvent(boolean addSelf, int type, RoonGiftModel gift) {
|
||||
this.addSelf = addSelf;
|
||||
this.type = type;
|
||||
this.gift = gift;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/7/18.
|
||||
*/
|
||||
|
||||
public class LocationCityEvent {
|
||||
private final String city;
|
||||
|
||||
public LocationCityEvent(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/7/18.
|
||||
*/
|
||||
|
||||
public class LocationEvent {
|
||||
private double lng;
|
||||
private double lat;
|
||||
|
||||
public LocationEvent(double lng, double lat) {
|
||||
this.lng = lng;
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public double getLng() {
|
||||
return lng;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
public class LogOutEvent {
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
public enum MessageType {
|
||||
JOIN_ROOM(1001, true, true), // 加入房间事件(展示+广播)
|
||||
CLEAR_CHAT(123, false, false), // 清空聊天(不展示不广播)
|
||||
GIFT_MESSAGE(1012, true, false), // 礼物消息(仅展示)
|
||||
MUSIC_PLAY(124, false, true), // 播放音乐(不展示但广播)
|
||||
DEFAULT(0, true, false); // 默认处理
|
||||
|
||||
private final int code;
|
||||
private final boolean show;
|
||||
private final boolean broadcast;
|
||||
|
||||
MessageType(int code, boolean show, boolean broadcast) {
|
||||
this.code = code;
|
||||
this.show = show;
|
||||
this.broadcast = broadcast;
|
||||
}
|
||||
|
||||
public static MessageType fromCode(int code) {
|
||||
for (MessageType type : values()) {
|
||||
if (type.code == code) return type;
|
||||
}
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
public boolean isShow() {
|
||||
return show;
|
||||
}
|
||||
|
||||
public boolean isBroadcast() {
|
||||
return broadcast;
|
||||
}
|
||||
}
|
||||
106
moduleUtil/src/main/java/com/xscm/moduleutil/event/MqttBean.java
Normal file
106
moduleUtil/src/main/java/com/xscm/moduleutil/event/MqttBean.java
Normal file
@@ -0,0 +1,106 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author lxj$
|
||||
* @Time $ $
|
||||
* @Description 从声望获取到的参数$
|
||||
*/
|
||||
@Data
|
||||
public class MqttBean {
|
||||
private String room_id;
|
||||
private ListBean list;
|
||||
|
||||
public String getRoom_id() {
|
||||
return room_id == null ? "" : room_id;
|
||||
}
|
||||
|
||||
public void setRoom_id(String room_id) {
|
||||
this.room_id = room_id == null ? "" : room_id;
|
||||
}
|
||||
|
||||
public ListBean getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setList(ListBean list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ListBean {
|
||||
private String text;
|
||||
private String gift_picture;
|
||||
private String room_id;
|
||||
private String fromUserName;
|
||||
private String toUserName;
|
||||
private String giftName;
|
||||
private String roomId;
|
||||
private String number;
|
||||
|
||||
public String getText() {
|
||||
return text == null ? "" : text;
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
this.text = text == null ? "" : text;
|
||||
}
|
||||
|
||||
public String getGift_picture() {
|
||||
return gift_picture == null ? "" : gift_picture;
|
||||
}
|
||||
|
||||
public void setGift_picture(String gift_picture) {
|
||||
this.gift_picture = gift_picture == null ? "" : gift_picture;
|
||||
}
|
||||
|
||||
public String getRoom_id() {
|
||||
return room_id == null ? "" : room_id;
|
||||
}
|
||||
|
||||
public void setRoom_id(String room_id) {
|
||||
this.room_id = room_id == null ? "" : room_id;
|
||||
}
|
||||
|
||||
public String getFromUserName() {
|
||||
return fromUserName == null ? "" : fromUserName;
|
||||
}
|
||||
|
||||
public void setFromUserName(String fromUserName) {
|
||||
this.fromUserName = fromUserName == null ? "" : fromUserName;
|
||||
}
|
||||
|
||||
public String getToUserName() {
|
||||
return toUserName == null ? "" : toUserName;
|
||||
}
|
||||
|
||||
public void setToUserName(String toUserName) {
|
||||
this.toUserName = toUserName == null ? "" : toUserName;
|
||||
}
|
||||
|
||||
public String getGiftName() {
|
||||
return giftName == null ? "" : giftName;
|
||||
}
|
||||
|
||||
public void setGiftName(String giftName) {
|
||||
this.giftName = giftName == null ? "" : giftName;
|
||||
}
|
||||
|
||||
public String getRoomId() {
|
||||
return roomId == null ? "" : roomId;
|
||||
}
|
||||
|
||||
public void setRoomId(String roomId) {
|
||||
this.roomId = roomId == null ? "" : roomId;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number == null ? "" : number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number == null ? "" : number;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/24
|
||||
*@description: 背景音乐
|
||||
*/
|
||||
@Data
|
||||
public class MusicEvent {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
/**
|
||||
* 项目名称 qipao-android
|
||||
* 包名:com.qpyy.room.event
|
||||
* 创建人 王欧
|
||||
* 创建时间 2020/8/11 3:40 PM
|
||||
* 描述 describe
|
||||
*/
|
||||
public class PasswordInputEvent {
|
||||
public String password;
|
||||
|
||||
public PasswordInputEvent(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
/**
|
||||
* Copyright (c) 1
|
||||
*
|
||||
* @Description
|
||||
* @Author 1
|
||||
* @Copyright Copyright (c) 1
|
||||
* @Date $date$ $time$
|
||||
*/
|
||||
|
||||
public class PayEvent {
|
||||
public PayEvent(int type, String content) {
|
||||
this.type = type;
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
int type;
|
||||
String content;
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package com.xscm.moduleutil.event
|
||||
|
||||
data class QDZMqttEvent(var json: String)
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RoomBanWheatEvent {
|
||||
|
||||
private String roomId;
|
||||
private String pit_number;
|
||||
private boolean isBanWheat;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RoomBeckoningEvent {
|
||||
|
||||
private String roomId;
|
||||
private boolean isOpen;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
public class RoomCardiacValueChangedEvent {
|
||||
public String pitNumber;
|
||||
public String value;
|
||||
public RoomCardiacValueChangedEvent() { this("", ""); }
|
||||
public RoomCardiacValueChangedEvent(String pit, String value) {
|
||||
this.pitNumber = pit;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class RoomFaceEvent {
|
||||
private String room_id;
|
||||
private String pit_number;
|
||||
private String special;
|
||||
private double time;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
|
||||
import com.xscm.moduleutil.adapter.GiftTwoAdapter;
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class RoomGiftClickEvent {
|
||||
public WeakReference<GiftTwoAdapter> adapter;
|
||||
public RoonGiftModel gift;
|
||||
public int type;
|
||||
public RoomGiftClickEvent(GiftTwoAdapter adapter, RoonGiftModel gift, int type) {
|
||||
this.adapter = new WeakReference<>(adapter);
|
||||
this.gift = gift;
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import com.xscm.moduleutil.adapter.GiftRoomAdapter;
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class RoomGiftClickToEvent {
|
||||
public WeakReference<GiftRoomAdapter> adapter;
|
||||
public RoonGiftModel gift;
|
||||
public int type;
|
||||
public RoomGiftClickToEvent(GiftRoomAdapter adapter, RoonGiftModel gift, int type) {
|
||||
this.adapter = new WeakReference<>(adapter);
|
||||
this.gift = gift;
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomGiftGiveEvent {
|
||||
public String userId;
|
||||
public String room_id;
|
||||
public String pit;
|
||||
public String num;
|
||||
public RoonGiftModel giftModel;
|
||||
public RoonGiftModel roonGiftModel;
|
||||
public int send_type;
|
||||
public String heart_id;
|
||||
public RoomGiftGiveEvent(String userId, String room_id, String pit, String num, int send_type, RoonGiftModel giftModel, RoonGiftModel roonGiftModel,String heart_id){
|
||||
this.userId = userId;
|
||||
this.room_id = room_id;
|
||||
this.pit = pit;
|
||||
this.num = num;
|
||||
this.send_type = send_type;
|
||||
this.giftModel = giftModel;
|
||||
this.roonGiftModel = roonGiftModel;
|
||||
this.heart_id = heart_id;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import com.xscm.moduleutil.adapter.GiftPackAdapter;
|
||||
import com.xscm.moduleutil.bean.GiftPackBean;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
/**
|
||||
* @Author lxj$
|
||||
* @Time 2025年7月29日23:42:45$ $
|
||||
* @Description 背包礼物选中$
|
||||
*/
|
||||
public class RoomGiftPackToEvent {
|
||||
public WeakReference<GiftPackAdapter> adapter;
|
||||
public GiftPackBean gift;
|
||||
public int type;
|
||||
public RoomGiftPackToEvent(GiftPackAdapter adapter, GiftPackBean gift, int type) {
|
||||
this.adapter = new WeakReference<>(adapter);
|
||||
this.gift = gift;
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author $
|
||||
* @Time $ $
|
||||
* @Description $
|
||||
*/
|
||||
public class RoomGiftRunable implements Runnable {
|
||||
|
||||
private String data;
|
||||
private static final List<MqttBean> mqttCache = new ArrayList<>();
|
||||
private static final int MAX_CACHE_SIZE = 6;
|
||||
private static final Object lock = new Object();
|
||||
public RoomGiftRunable(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
MqttBean mqttBean= GsonUtils.fromJson(data, MqttBean.class);
|
||||
// 线程安全地添加到缓存
|
||||
synchronized (lock) {
|
||||
if (mqttCache.size() >= MAX_CACHE_SIZE) {
|
||||
mqttCache.remove(0); // 移除第一条数据
|
||||
}
|
||||
mqttCache.add(mqttBean); // 添加新数据
|
||||
}
|
||||
EventBus.getDefault().post(mqttBean);
|
||||
// new FloatingWindow(CommonAppContext.getInstance(),mqttBean);
|
||||
|
||||
}
|
||||
|
||||
// 提供方法获取缓存数据
|
||||
public static List<MqttBean> getMqttCache() {
|
||||
synchronized (lock) {
|
||||
return new ArrayList<>(mqttCache);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
/**
|
||||
* @Author lxj$
|
||||
* @Time $ $
|
||||
* @Description 隐藏软键盘$
|
||||
*/
|
||||
public class RoomInputHideEvent {
|
||||
public boolean hide;
|
||||
|
||||
public RoomInputHideEvent(boolean hide) {
|
||||
this.hide = hide;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/13
|
||||
*@description: 进场特效,坐骑
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RoomJoinMountModel {
|
||||
|
||||
private String room_id;
|
||||
private String ride_url;
|
||||
//1公屏 2全屏
|
||||
private int show_type;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
public class RoomOutEvent {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RoomOwnerLeaveEvent {
|
||||
private String room_id;
|
||||
private String user_id;
|
||||
private String emchat_username;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
/**
|
||||
* @Author lxj$
|
||||
* @Time 2025-8-6 14:53:35$ $
|
||||
* @Description 房间任务信息$
|
||||
*/
|
||||
public class RoomTaskEvent {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RoomWheatEvent {
|
||||
|
||||
private String roomId;
|
||||
private boolean isFree; //true 自由 false 排麦
|
||||
private boolean isOccupied;//true 上麦 false 下麦
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
public class ShowOnWheatDialogEvent {
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import android.view.SurfaceView;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author lxj$
|
||||
* @Time $ $
|
||||
* @Description 判断是否是电影房$
|
||||
*/
|
||||
@Data
|
||||
public class SurfaceEvent {
|
||||
|
||||
private SurfaceView surfaceView;
|
||||
private int type;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author lxj$
|
||||
* @Time 2025年7月28日16:34:24$ $
|
||||
* @Description $ 这是获取到腾讯的im总得未读数量
|
||||
*/
|
||||
@Data
|
||||
public class TxEvent {
|
||||
private long unreadCount;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/7/15
|
||||
*@description: 这是im展示需要显示的未读消息数
|
||||
*/
|
||||
@Data
|
||||
public class UnreadCountEvent {
|
||||
private long aLong;
|
||||
|
||||
public UnreadCountEvent(long aLong) {
|
||||
this.aLong = aLong;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
public class UserDownWheatEvent {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
public class UserInfoShowEvent {
|
||||
public String roomId;
|
||||
public String userId;
|
||||
|
||||
public UserInfoShowEvent(String roomId, String userId) {
|
||||
this.roomId = roomId;
|
||||
this.userId = userId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user