私聊页面添加直播飞机票

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

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