feat:完成房间在线列表优化需求

This commit is contained in:
Max
2024-01-02 11:32:05 +08:00
parent 15b317d5d0
commit 067f97d6be
11 changed files with 105 additions and 817 deletions

View File

@@ -0,0 +1,12 @@
package com.yizhuan.xchat_android_core.room.bean
import com.yizhuan.xchat_android_core.user.bean.UserInfo
/**
* Created by Max on 2024/1/2 10:30
* Desc:房间在线用户
**/
data class RoomOnlineUserBean(
// MANAGER:管理员
val memberType: String? = null
) : UserInfo()

View File

@@ -16,6 +16,7 @@ import com.yizhuan.xchat_android_core.exception.ErrorThrowable;
import com.yizhuan.xchat_android_core.im.custom.bean.User;
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
import com.yizhuan.xchat_android_core.room.bean.OnlineChatMember;
import com.yizhuan.xchat_android_core.room.bean.RoomOnlineUserBean;
import com.yizhuan.xchat_android_core.room.model.inteface.IHomePartyUserListModel;
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
@@ -230,7 +231,7 @@ public class HomePartyUserListModel extends RoomBaseModel implements IHomePartyU
.observeOn(AndroidSchedulers.mainThread());
}
public Single<List<UserInfo>> getRoomOnlineList(long roomUid) {
public Single<List<RoomOnlineUserBean>> getRoomOnlineList(long roomUid) {
return api.getRoomOnlineList(roomUid)
.compose(RxHelper.handleBeanData())
.compose(RxHelper.handleSchedulers());
@@ -242,6 +243,6 @@ public class HomePartyUserListModel extends RoomBaseModel implements IHomePartyU
* @return
*/
@GET("/room/v2/online")
Single<ServiceResult<List<UserInfo>>> getRoomOnlineList(@Query("roomUid") long roomUid);
Single<ServiceResult<List<RoomOnlineUserBean>>> getRoomOnlineList(@Query("roomUid") long roomUid);
}
}