贵族图标替换 同时增加新的参数

This commit is contained in:
ningwenqiang 2024-09-23 14:23:27 +08:00
parent 31c8365696
commit dffe681b95
5 changed files with 57 additions and 23 deletions

View File

@ -31,19 +31,28 @@ public class LiveHttpUtil {
HttpClient.getInstance().cancel(tag);
}
/**
* 获取当前直播间的用户列表
*/
public static void getUserList(String liveuid, String stream, String type, int p, HttpCallback callback) {
public static void getUserList(String liveuid, String stream, String type, int p,String is_noble,HttpCallback callback) {
HttpClient.getInstance().get("Live.getUserLists", LiveHttpConsts.GET_USER_LIST)
.params("liveuid", liveuid)
.params("stream", stream)
.params("type", type)
.params("p", p)
.params("is_noble", is_noble)
.params("version", "" + VersionUtil.getVersion())
.execute(callback);
}
/**
* 获取当前直播间的用户列表
*/
public static void getUserList(String liveuid, String stream, String type, int p, HttpCallback callback) {
getUserList(liveuid,stream,type,p,"0",callback);
}
/**
* 获取直播用户日榜/周榜
*

View File

@ -31,6 +31,7 @@ import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.CommonIconUtil;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.NobleUtil;
import com.yunbao.common.utils.SVGAViewUtils;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.weight.ClipPathCircleImage;
@ -56,6 +57,8 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
private List<String> outRankHide = new ArrayList<>();
private boolean noble = false;
private String TAG = "UserMoreInfoAdapter";
public UserMoreInfoAdapter setNoble(boolean noble) {
this.noble = noble;
return this;
@ -160,12 +163,26 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
tvName.setTextSize(12);
tvName.setTextColor(mContext.getResources().getColor(R.color.white));
if (type.equals("1")) {
if (noble) {
Log.i(TAG, "type:1 贵族");
String NobleImg = bean.getNoble_img();
if (!TextUtils.isEmpty(NobleImg)){
if (!NobleImg.equals("")) {
ImgLoader.display(mContext, NobleImg, mIcon);
} else if (!bean.getDress().getMedal().equals("")) {
} else {
String vipType = bean.getNoble_id();
if (!TextUtils.isEmpty(vipType) && !vipType.equals("0")) {
mIcon.setImageResource(NobleUtil.nobleIdToImageResId(Integer.parseInt(vipType)));
}
}
} else {
Log.i(TAG, "type:1 普通观众");
//清空mIcon的Img
mIcon.setImageBitmap(null);
if (!bean.getDress().getMedal().equals("")) {
Log.i(TAG, "getMedal:1 普通观众");
ImgLoader.display(mContext, bean.getDress().getMedal(), mIcon);
} else {
Log.i(TAG, "getMedal:2 普通观众");
int guardType = ((LiveUserGiftBean) bean).getGuardType();
if (guardType == Constants.GUARD_TYPE_NONE) {
if (mIcon.getVisibility() != View.VISIBLE) {
@ -184,6 +201,8 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
}
}
}
}
} else if (type.equals("2")) {
int guardType = ((LiveUserGiftBean) bean).getGuardType();
if (guardType == Constants.GUARD_TYPE_NONE) {

View File

@ -160,6 +160,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
Up();
type = "guanzhong";
mRefreshView.initData();
userMoreInfoAdapter.setNoble(false);
no_more.setImageBitmap(null);
}
});
@ -240,8 +241,12 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
throwable.printStackTrace();
callback.onError();
}).isDisposed();
} else {
if(Tips=="1" && noble){
LiveHttpUtil.getUserList(mLiveUid, stream, type, p,"1",callback);
}else {
LiveHttpUtil.getUserList(mLiveUid, stream, type, p,callback);
}
pg = p;
if (p == 1) {
noMoreLayout.setVisibility(View.VISIBLE);

View File

@ -5569,6 +5569,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
mLiveRoomHandler.removeCallbacksAndMessages(null);
}
//设置快速回复
public void setFastMessage(List<String> greetings) {
fastMsgRecyclerView.setVisibility(View.VISIBLE);
fastMessageRecyclerViewAdapter.setMessage(greetings);

View File

@ -628,7 +628,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
//数据设置
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.setLiveInfo(mLiveBean.getUid(), mLiveBean.getStream(), Integer.parseInt(data.getEnterRoomInfo().getUserlistTime()) * 4000);
// mLiveRoomViewHolder.setFastMessage(greetings);
mLiveRoomViewHolder.setFastMessage(greetings);
mLiveRoomViewHolder.setVotes(data.getEnterRoomInfo().getVotestotal());
//真爱排行 数量
mLiveRoomViewHolder.setMedaRankNum(data.getEnterRoomInfo().getMedalRankNum());