修复连麦看观众列表json转换丢失数据问题

This commit is contained in:
zlzw 2022-11-26 14:36:50 +08:00
parent a8d4d64174
commit 2843131151
2 changed files with 38 additions and 2 deletions

View File

@ -62,4 +62,41 @@ public class LiveUserGiftBean extends UserBean {
public void writeToParcel(Parcel dest, int flags) { public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags); super.writeToParcel(dest, flags);
} }
@Override
public String toString() {
return "LiveUserGiftBean{" +
"contribution='" + contribution + '\'' +
", guardType=" + guardType +
", nub=" + nub +
", id='" + id + '\'' +
", userNiceName='" + userNiceName + '\'' +
", avatar='" + avatar + '\'' +
", avatarThumb='" + avatarThumb + '\'' +
", sex=" + sex +
", signature='" + signature + '\'' +
", coin='" + coin + '\'' +
", gold='" + gold + '\'' +
", votes='" + votes + '\'' +
", consumption='" + consumption + '\'' +
", votestotal='" + votestotal + '\'' +
", province='" + province + '\'' +
", city='" + city + '\'' +
", location='" + location + '\'' +
", birthday='" + birthday + '\'' +
", level=" + level +
", levelAnchor=" + levelAnchor +
", lives=" + lives +
", follows=" + follows +
", fans=" + fans +
", vip=" + vip +
", liang=" + liang +
", car=" + car +
", medal_level=" + medal_level +
", medal_name='" + medal_name + '\'' +
", Dress=" + Dress +
", noble_id='" + noble_id + '\'' +
", yuanbao='" + yuanbao + '\'' +
'}';
}
} }

View File

@ -200,8 +200,7 @@ public class SocketRyClient {
mListener.onUpUserList(map.getJSONObject("ct")); mListener.onUpUserList(map.getJSONObject("ct"));
EventBus.getDefault().post(new LiveAudienceEvent() EventBus.getDefault().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.LINK_MIC_UPDATE_AUDIENCE_LIST) .setType(LiveAudienceEvent.LiveAudienceType.LINK_MIC_UPDATE_AUDIENCE_LIST)
.setObject( GsonUtils.fromJson(map.getJSONObject("ct").getString("userlist"), new TypeToken<List<LiveUserGiftBean>>() { .setObject(JSON.parseArray(map.getJSONObject("ct").getString("userlist"), LiveUserGiftBean.class))
}.getType()))
); );
break; break;
case Constants.CARD: case Constants.CARD: