私聊页面添加直播飞机票

This commit is contained in:
18401019693 2022-09-06 15:12:40 +08:00
parent cb50c00a06
commit 38e85d20a4
3 changed files with 15 additions and 4 deletions

View File

@ -19,6 +19,17 @@ public class RecommendLiveRoomModel extends BaseModel {
private String avatar; private String avatar;
@SerializedName("title") @SerializedName("title")
private String title; private String title;
@SerializedName("admin_nickname")
private String adminNickname;
public String getAdminNickname() {
return adminNickname;
}
public RecommendLiveRoomModel setAdminNickname(String adminNickname) {
this.adminNickname = adminNickname;
return this;
}
public String getLiveuid() { public String getLiveuid() {
return liveuid; return liveuid;

View File

@ -9,9 +9,7 @@ import io.rong.imlib.model.MessageContent;
@SuppressLint("ParcelCreator") @SuppressLint("ParcelCreator")
@MessageTag(value = "InstructorSendReward", flag = MessageTag.ISCOUNTED) @MessageTag(value = "InstructorSendReward", flag = MessageTag.ISCOUNTED)
public class InstructorSendReward extends MessageContent { public class InstructorSendReward extends MessageContent {
public InstructorSendReward(byte[] data) {
super(data);
}
@Override @Override
public byte[] encode() { public byte[] encode() {

View File

@ -29,6 +29,7 @@ import io.rong.imlib.model.MessageContent;
*/ */
public class RecommendLiveRoomProvider extends BaseMessageItemProvider<RecommendLiveRoom> { public class RecommendLiveRoomProvider extends BaseMessageItemProvider<RecommendLiveRoom> {
private Context mContext; private Context mContext;
private String politicalInstructor = "";
public RecommendLiveRoomProvider(Context context) { public RecommendLiveRoomProvider(Context context) {
this.mContext = context; this.mContext = context;
@ -69,9 +70,10 @@ public class RecommendLiveRoomProvider extends BaseMessageItemProvider<Recommend
@Override @Override
public Spannable getSummarySpannable(Context context, RecommendLiveRoom recommendLiveRoom) { public Spannable getSummarySpannable(Context context, RecommendLiveRoom recommendLiveRoom) {
String politicalInstructor = "";
if (recommendLiveRoom != null && !TextUtils.isEmpty(recommendLiveRoom.getContent())) { if (recommendLiveRoom != null && !TextUtils.isEmpty(recommendLiveRoom.getContent())) {
RecommendLiveRoomModel model = new Gson().fromJson(recommendLiveRoom.getContent(), RecommendLiveRoomModel.class); RecommendLiveRoomModel model = new Gson().fromJson(recommendLiveRoom.getContent(), RecommendLiveRoomModel.class);
politicalInstructor = model.getAdminNickname();
} }
return new SpannableString(politicalInstructor + mContext.getString(R.string.live_room_air_ticket)); return new SpannableString(politicalInstructor + mContext.getString(R.string.live_room_air_ticket));
} }