From cb50c00a064d56f7ad5a37697b8f3a0ad96caba4 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 6 Sep 2022 14:35:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=81=E8=81=8A=E9=A1=B5=E9=9D=A2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=9B=B4=E6=92=AD=E9=A3=9E=E6=9C=BA=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/shayu/phonelive/AppContext.java | 17 +- .../common/bean/RecommendLiveRoomModel.java | 58 +++++ .../imrongcloud/InstructorSendReward.java | 30 +++ .../InstructorSendRewardProvider.java | 84 +++++++ .../imrongcloud/RecommendLiveRoom.java | 115 +++++++++ .../imrongcloud/RongcloudIMManager.java | 6 + .../res/layout/view_recommend_live_room.xml | 52 ++++ .../src/main/res/mipmap-xxhdpi/btn_golive.png | Bin 0 -> 8851 bytes .../main/res/mipmap-xxhdpi/tab_recommend.png | Bin 0 -> 18190 bytes common/src/main/res/values-en/strings.xml | 1 + common/src/main/res/values/strings.xml | 1 + .../live/activity/LiveAudienceActivity.java | 4 + .../live/activity/PDLIiveChatActivity.java | 42 +++- .../java/com/yunbao/live/bean/ImUserBean.java | 12 + .../PDLIiveChatConversationFragment.java | 222 ++++++++++++++++++ .../yunbao/live/event/LiveAudienceEvent.java | 1 + .../live/event/RecommendLiveRoomEvent.java | 21 ++ .../live/views/RecommendLiveRoomProvider.java | 78 ++++++ .../res/layout/fragment_chat_conversation.xml | 45 ++++ .../res/layout/rc_conversationlist_item.xml | 14 +- live/src/main/res/layout/view_input_panel.xml | 1 + .../yunbao/main/activity/MainActivity.java | 30 +-- .../PDLiveConversationListActivity.java | 34 ++- .../ConversationIMListManager.java | 15 +- .../PDLiveCustomConversationProvider.java | 2 +- 25 files changed, 846 insertions(+), 39 deletions(-) create mode 100644 common/src/main/java/com/yunbao/common/bean/RecommendLiveRoomModel.java create mode 100644 common/src/main/java/com/yunbao/common/manager/imrongcloud/InstructorSendReward.java create mode 100644 common/src/main/java/com/yunbao/common/manager/imrongcloud/InstructorSendRewardProvider.java create mode 100644 common/src/main/java/com/yunbao/common/manager/imrongcloud/RecommendLiveRoom.java create mode 100644 common/src/main/res/layout/view_recommend_live_room.xml create mode 100644 common/src/main/res/mipmap-xxhdpi/btn_golive.png create mode 100644 common/src/main/res/mipmap-xxhdpi/tab_recommend.png create mode 100644 live/src/main/java/com/yunbao/live/dialog/PDLIiveChatConversationFragment.java create mode 100644 live/src/main/java/com/yunbao/live/event/RecommendLiveRoomEvent.java create mode 100644 live/src/main/java/com/yunbao/live/views/RecommendLiveRoomProvider.java create mode 100644 live/src/main/res/layout/fragment_chat_conversation.xml diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index 33f2e91c7..c4ed7dc61 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -29,7 +29,11 @@ import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.manager.imrongcloud.InstructorSendReward; +import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider; import com.yunbao.common.manager.imrongcloud.MessageIMManager; +import com.yunbao.common.manager.imrongcloud.RecommendLiveRoom; +import com.yunbao.live.views.RecommendLiveRoomProvider; import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.L; import com.yunbao.common.utils.SpUtil; @@ -40,12 +44,13 @@ import com.yunbao.main.activity.MsgSettActivity; import java.io.File; import java.io.IOException; +import java.util.ArrayList; +import io.rong.imkit.config.RongConfigCenter; import io.rong.imlib.RongIMClient; import io.rong.imlib.model.Conversation; +import io.rong.imlib.model.MessageContent; import io.rong.message.TextMessage; -import io.rong.push.RongPushClient; -import io.rong.push.pushconfig.PushConfig; import static com.yunbao.live.socket.SocketClient.mSocketHandler; @@ -166,6 +171,14 @@ public class AppContext extends CommonAppContext { //初始化融云 RongcloudIMManager.initRongIM(this); + ArrayList> myMessages = new ArrayList<>(); + myMessages.add(RecommendLiveRoom.class); + myMessages.add(InstructorSendReward.class); + + RongIMClient.registerMessageType(myMessages); + // 注册自定义消息模板 + RongConfigCenter.conversationConfig().addMessageProvider(new InstructorSendRewardProvider()); + RongConfigCenter.conversationConfig().addMessageProvider(new RecommendLiveRoomProvider(getApplicationContext())); RongcloudIMManager.addRongcloudIMOnReceiveMessageListener(new RongIMClient.OnReceiveMessageWrapperListener() { @Override diff --git a/common/src/main/java/com/yunbao/common/bean/RecommendLiveRoomModel.java b/common/src/main/java/com/yunbao/common/bean/RecommendLiveRoomModel.java new file mode 100644 index 000000000..f8cdf1b07 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/RecommendLiveRoomModel.java @@ -0,0 +1,58 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; + +public class RecommendLiveRoomModel extends BaseModel { + + /** + * liveuid : 97714 + * user_nicename : rongyun004 + * avatar : https://downs.yaoulive.com/20220329113227_c661f791c5fc878c2ef357ee022f9fbc?imageView2/2/w/600/h/600 + * title : + */ + + @SerializedName("liveuid") + private String liveuid; + @SerializedName("user_nicename") + private String userNicename; + @SerializedName("avatar") + private String avatar; + @SerializedName("title") + private String title; + + public String getLiveuid() { + return liveuid; + } + + public RecommendLiveRoomModel setLiveuid(String liveuid) { + this.liveuid = liveuid; + return this; + } + + public String getUserNicename() { + return userNicename; + } + + public RecommendLiveRoomModel setUserNicename(String userNicename) { + this.userNicename = userNicename; + return this; + } + + public String getAvatar() { + return avatar; + } + + public RecommendLiveRoomModel setAvatar(String avatar) { + this.avatar = avatar; + return this; + } + + public String getTitle() { + return title; + } + + public RecommendLiveRoomModel setTitle(String title) { + this.title = title; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/InstructorSendReward.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/InstructorSendReward.java new file mode 100644 index 000000000..98a8d2f78 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/InstructorSendReward.java @@ -0,0 +1,30 @@ +package com.yunbao.common.manager.imrongcloud; + +import android.annotation.SuppressLint; +import android.os.Parcel; + +import io.rong.imlib.MessageTag; +import io.rong.imlib.model.MessageContent; + +@SuppressLint("ParcelCreator") +@MessageTag(value = "InstructorSendReward", flag = MessageTag.ISCOUNTED) +public class InstructorSendReward extends MessageContent { + public InstructorSendReward(byte[] data) { + super(data); + } + + @Override + public byte[] encode() { + return new byte[0]; + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + + } +} diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/InstructorSendRewardProvider.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/InstructorSendRewardProvider.java new file mode 100644 index 000000000..3fd1c0c85 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/InstructorSendRewardProvider.java @@ -0,0 +1,84 @@ +package com.yunbao.common.manager.imrongcloud; + +import android.content.Context; +import android.text.Spannable; +import android.view.ViewGroup; + +import java.util.List; + +import io.rong.imkit.conversation.messgelist.provider.BaseMessageItemProvider; +import io.rong.imkit.model.UiMessage; +import io.rong.imkit.widget.adapter.IViewProviderListener; +import io.rong.imkit.widget.adapter.ViewHolder; +import io.rong.imlib.model.MessageContent; + +/** + * 自定义消息模板 + */ +public class InstructorSendRewardProvider extends BaseMessageItemProvider { + /** + * 创建 ViewHolder + * + * @param viewGroup 父 ViewGroup + * @param viewType 视图类型 + * @return ViewHolder + */ + @Override + protected ViewHolder onCreateMessageContentViewHolder(ViewGroup viewGroup, int viewType) { + return null; + } + + /** + * 设置消息视图里各 view 的值 + * + * @param holder ViewHolder + * @param parentHolder 父布局的 ViewHolder + * @param instructorSendReward 此展示模板对应的消息 + * @param uiMessage {@link UiMessage} + * @param position 消息位置 + * @param list 列表 + * @param listener ViewModel 的点击事件监听器。如果某个子 view 的点击事件需要 ViewModel 处理,可通过此监听器回调。 + */ + @Override + protected void bindMessageContentViewHolder(ViewHolder holder, ViewHolder parentHolder, InstructorSendReward instructorSendReward, UiMessage uiMessage, int position, List list, IViewProviderListener listener) { + + } + + /** + * @param holder ViewHolder + * @param instructorSendReward 自定义消息 + * @param uiMessage {@link UiMessage} + * @param position 位置 + * @param list 列表数据 + * @param listener ViewModel 的点击事件监听器。如果某个子 view 的点击事件需要 ViewModel 处理,可通过此监听器回调。 + * @return 点击事件是否被消费 + */ + @Override + protected boolean onItemClick(ViewHolder holder, InstructorSendReward instructorSendReward, UiMessage uiMessage, int position, List list, IViewProviderListener listener) { + return false; + } + + /** + * 根据消息内容,判断是否为本模板需要展示的消息类型 + * + * @param messageContent 消息内容 + * @return 本模板是否处理。 + */ + @Override + protected boolean isMessageViewType(MessageContent messageContent) { + return messageContent instanceof InstructorSendReward; + } + + /** + * 在会话列表页某条会话最后一条消息为该类型消息时,会话里需要展示的内容。 + * 比如: 图片消息在会话里需要展示为"图片",那返回对应的字符串资源即可。 + * + * @param context 上下文 + * @param instructorSendReward 消息内容 + * @return 会话里需要展示的字符串资源 + */ + @Override + public Spannable getSummarySpannable(Context context, InstructorSendReward instructorSendReward) { + return null; + } +} diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/RecommendLiveRoom.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/RecommendLiveRoom.java new file mode 100644 index 000000000..e699e9094 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/RecommendLiveRoom.java @@ -0,0 +1,115 @@ +package com.yunbao.common.manager.imrongcloud; + +import android.annotation.SuppressLint; +import android.os.Parcel; +import android.os.Parcelable; + +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.UnsupportedEncodingException; + +import io.rong.common.ParcelUtils; +import io.rong.imlib.MessageTag; +import io.rong.imlib.model.MessageContent; + +@MessageTag(value = "RecommendLiveRoom", flag = MessageTag.ISCOUNTED) +public class RecommendLiveRoom extends MessageContent implements Parcelable { + // 自定义消息变量,可以有多个 + private String content; + + public RecommendLiveRoom setContent(String content) { + this.content = content; + return this; + } + + public String getContent() { + return content; + } + + public RecommendLiveRoom(byte[] data) { + if (data == null) { + return; + } + String jsonStr = null; + try { + jsonStr = new String(data, "UTF-8"); + } catch (UnsupportedEncodingException e) { + } + if (jsonStr == null) { + return; + } + + try { + JSONObject jsonObj = new JSONObject(jsonStr); + // 消息携带用户信息时, 自定义消息需添加下面代码 + if (jsonObj.has("user")) { + setUserInfo(parseJsonToUserInfo(jsonObj.getJSONObject("user"))); + } + // 用于群组聊天, 消息携带 @ 人信息时, 自定义消息需添加下面代码 + if (jsonObj.has("mentionedInfo")) { + setMentionedInfo(parseJsonToMentionInfo(jsonObj.getJSONObject("mentionedInfo"))); + } + // 将所有自定义变量从收到的 json 解析并赋值 + if (jsonObj.has("content")) { + content = jsonObj.optString("content"); + } + } catch (JSONException e) { + } + } + + /** + * 将本地消息对象序列化为消息数据。 + * + * @return 消息数据。 + */ + @Override + public byte[] encode() { + JSONObject jsonObj = new JSONObject(); + try { + // 消息携带用户信息时, 自定义消息需添加下面代码 + if (getJSONUserInfo() != null) { + jsonObj.putOpt("user", getJSONUserInfo()); + } + // 用于群组聊天, 消息携带 @ 人信息时, 自定义消息需添加下面代码 + if (getJsonMentionInfo() != null) { + jsonObj.putOpt("mentionedInfo", getJsonMentionInfo()); + } + // 将所有自定义消息的内容,都序列化至 json 对象中 + jsonObj.put("content", this.content); + } catch (JSONException e) { + } + + try { + return jsonObj.toString().getBytes("UTF-8"); + } catch (UnsupportedEncodingException e) { + } + return null; + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + ParcelUtils.writeToParcel(dest, getExtra()); + ParcelUtils.writeToParcel(dest, content); + } + public static final Creator CREATOR = new Creator() { + @Override + public RecommendLiveRoom createFromParcel(Parcel source) { + return new RecommendLiveRoom(source); + } + + @Override + public RecommendLiveRoom[] newArray(int size) { + return new RecommendLiveRoom[size]; + } + }; + public RecommendLiveRoom(Parcel in) { + setExtra(ParcelUtils.readFromParcel(in)); + setContent(ParcelUtils.readFromParcel(in)); + } +} diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java index d7f055a1e..0bc787c92 100644 --- a/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java @@ -16,6 +16,8 @@ import com.yunbao.common.manager.IMLoginManager; import org.greenrobot.eventbus.EventBus; +import java.util.ArrayList; + import io.rong.imkit.GlideKitImageEngine; import io.rong.imkit.IMCenter; import io.rong.imkit.RongIM; @@ -23,6 +25,7 @@ import io.rong.imkit.config.RongConfigCenter; import io.rong.imlib.RongIMClient; import io.rong.imlib.model.Conversation; import io.rong.imlib.model.Message; +import io.rong.imlib.model.MessageContent; import static com.yunbao.common.CommonAppContext.isReady; @@ -46,8 +49,11 @@ public class RongcloudIMManager { public static void initRongIM(Application application) { //第三个参数代表是否开启推送 RongIM.init(application, RONG_IM_KEY, true); + + Log.e(CLASSNAME, "initRongIM:"); initPhotoGlide(); + } private static RongIMClient.OnReceiveMessageWrapperListener mListener; diff --git a/common/src/main/res/layout/view_recommend_live_room.xml b/common/src/main/res/layout/view_recommend_live_room.xml new file mode 100644 index 000000000..19955dcef --- /dev/null +++ b/common/src/main/res/layout/view_recommend_live_room.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/mipmap-xxhdpi/btn_golive.png b/common/src/main/res/mipmap-xxhdpi/btn_golive.png new file mode 100644 index 0000000000000000000000000000000000000000..4b890a52cbb3cf8aaa75c1eb5fe7ba756059441e GIT binary patch literal 8851 zcmV;EB5d7>P)PyA07*naRCr$PeFv0fWtH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y0^W~A8yU#8=yP5@FW1cdgS&?_9Hwl+}{voH1>Dw6FhFPrs-cExzcz`}6XjPsM??&5l!K>@2W1a zqA!Cpl>yC+yd$;IKj4&{N17Gm@<<=j$*nu93+VWayt{9cyRTDne$pslJv&sxtXIb} z+E%Nt@ww7LghKfB@ezL|=y;E}O6HZ3w7xym-@Lsv< zkwX%`fB^RpoOL=vr6hbqYyjJAe!g@tSoS(7`K+rVY4hsnAZEfhZ!12>@}5oOs%qXC z%Nbj(l)I->3_2`83SS#GqP*$j0<*|g0%_Er{YrRNlMJ`kK`HciE28oJ^FMz6S~UEL zS|yb~TjcF((R~viI(tD z?F+v#HR3+ssk)E1E5hLnqa^ezLTPQ2mFnPoRRV`ZsgA(McQ!5!rSxr~RQr3Cc?pQH zs+unk_vz<{Gm=Z~?baz12={hM&cm%T;X>$FMf%p-Ecp)l@n}NPt=Gnf)VON3zFwJP z1<$5YRW+^(_v_okecdb@A%qV>u;{h?J*~38gr#3Zcl&A$qDS zM(uQo*;>Ifv@>uV#O%9H;+TqE;edSU;o!KZi* zGh=Yd%KhYelfPT{=IEn4L66SWlmY6!`|)aN_8q4R8@6^N0fVh{_kB2gtiGR2M?OXy z>gMirGewX5O{Qsd>*&2ee_DO!k?$<8KW1Z_o;PDHpXx+yu2yh3@>$2Wx7yaRefv4h z4~)5yi6Q`ZD^&Z3$R7_JH?{oO*CUNTM<79xoN220&#A-b9(!&CUXl?IpmG6C0&ttF z>tFBxNdMX%NH40|HU9!tJKT-p=eMi*OEMtm8a+1xXEFj Shield gift effect Shield car effect You are in the current live room + has recommended an anchor to you! diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 814fe5ca2..4309ba804 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -884,6 +884,7 @@ 屏蔽座駕特效 您已在當前直播間 是否清空未讀消息 + 向您推薦了一名主播! 人氣票 系統通知 在線客服 diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 3d9f643d2..aa3d405a1 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -51,6 +51,7 @@ import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.L; import com.yunbao.common.utils.ProcessResultUtil; +import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.weight.VerticalViewPager; import com.yunbao.live.R; @@ -67,6 +68,7 @@ import com.yunbao.live.dialog.SidebarLiveAudience; import com.yunbao.live.event.LinkMicTxAccEvent; import com.yunbao.live.event.LiveAudienceEvent; import com.yunbao.live.event.LiveRoomChangeEvent; +import com.yunbao.live.event.RecommendLiveRoomEvent; import com.yunbao.live.http.ImHttpUtil; import com.yunbao.live.http.LiveHttpConsts; import com.yunbao.live.http.LiveHttpUtil; @@ -848,6 +850,8 @@ public class LiveAudienceActivity extends LiveActivity { } }); } + + @Override public boolean canBackPressed() { return super.canBackPressed(); diff --git a/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java b/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java index 11a236b47..348f1033d 100644 --- a/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java @@ -25,13 +25,22 @@ import com.yunbao.common.http.HttpCallback; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.InstructorRemarkManager; import com.yunbao.common.manager.imrongcloud.MessageIMManager; +import com.yunbao.common.utils.Bus; +import com.yunbao.common.utils.RouteUtil; import com.yunbao.live.R; import com.yunbao.live.adapter.SystemChatMessageAdapter; import com.yunbao.live.bean.ImUserBean; +import com.yunbao.live.bean.LiveBean; import com.yunbao.live.bean.SearchUserBean; -import com.yunbao.live.http.ImHttpUtil; +import com.yunbao.live.event.LiveRoomChangeEvent; +import com.yunbao.live.event.RecommendLiveRoomEvent; +import com.yunbao.live.http.LiveHttpUtil; +import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; + +import org.greenrobot.eventbus.EventBus; +import org.greenrobot.eventbus.Subscribe; +import org.greenrobot.eventbus.ThreadMode; -import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -56,6 +65,7 @@ public class PDLIiveChatActivity extends FragmentActivity { windowColor(); initView(); initData(); + Bus.getOn(this); } @@ -181,4 +191,32 @@ public class PDLIiveChatActivity extends FragmentActivity { }, true); } + + @Override + protected void onDestroy() { + super.onDestroy(); + Bus.getOff(this); + } + + @Subscribe(threadMode = ThreadMode.MAIN) + public void onRecommendLiveRoomEvent(RecommendLiveRoomEvent event) { + LiveHttpUtil.getLiveInfo(event.getLiveuid(), new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0 && info.length > 0) { + LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); + LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean1, liveType, liveTypeVal, liveSdk) -> { + if (liveBean1 == null) { + return; + } + EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, liveTypeVal)); + finish(); + }); + mCheckLivePresenter.checkLive(liveBean); + } else { + RouteUtil.forwardUserHome(mContext, event.getLiveuid(), 0); + } + } + }); + } } diff --git a/live/src/main/java/com/yunbao/live/bean/ImUserBean.java b/live/src/main/java/com/yunbao/live/bean/ImUserBean.java index 4877313c1..d83fea755 100644 --- a/live/src/main/java/com/yunbao/live/bean/ImUserBean.java +++ b/live/src/main/java/com/yunbao/live/bean/ImUserBean.java @@ -2,6 +2,7 @@ package com.yunbao.live.bean; import android.text.TextUtils; +import com.google.gson.annotations.SerializedName; import com.yunbao.common.bean.BaseModel; import java.text.SimpleDateFormat; @@ -27,6 +28,17 @@ public class ImUserBean extends BaseModel { String is_admin; String isDelet; String _method_ = "";//融雲消息類型 + @SerializedName("new_image") + private String newImage; + + public String getNewImage() { + return newImage; + } + + public ImUserBean setNewImage(String newImage) { + this.newImage = newImage; + return this; + } public String getTitle() { return title; diff --git a/live/src/main/java/com/yunbao/live/dialog/PDLIiveChatConversationFragment.java b/live/src/main/java/com/yunbao/live/dialog/PDLIiveChatConversationFragment.java new file mode 100644 index 000000000..2a56793f9 --- /dev/null +++ b/live/src/main/java/com/yunbao/live/dialog/PDLIiveChatConversationFragment.java @@ -0,0 +1,222 @@ +package com.yunbao.live.dialog; + +import android.Manifest; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.os.Bundle; +import android.text.TextUtils; +import android.util.Log; +import android.view.Gravity; +import android.view.View; +import android.view.Window; +import android.view.WindowManager; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; + +import com.adjust.sdk.Adjust; +import com.adjust.sdk.AdjustEvent; +import com.blankj.utilcode.util.GsonUtils; +import com.facebook.appevents.AppEventsLogger; +import com.google.firebase.analytics.FirebaseAnalytics; +import com.yunbao.common.activity.SelectImageActivity; +import com.yunbao.common.bean.IMLoginModel; +import com.yunbao.common.bean.ImageEntity; +import com.yunbao.common.bean.NoviceInstructorModel; +import com.yunbao.common.dialog.AbsDialogFragment; +import com.yunbao.common.http.CommonHttpUtil; +import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.manager.NoviceInstructorManager; +import com.yunbao.live.R; +import com.yunbao.live.bean.SearchUserBean; +import com.yunbao.live.views.InputPanelViewHolder; +import com.yunbao.live.views.PDLiveConversationFragment; + +import java.util.ArrayList; + +import io.rong.imkit.userinfo.RongUserInfoManager; +import io.rong.imlib.RongIMClient; +import io.rong.imlib.model.Conversation; +import io.rong.imlib.model.UserInfo; + +/** + * 半屏聊天框 + */ +public class PDLIiveChatConversationFragment extends AbsDialogFragment implements View.OnClickListener { + private PDLiveConversationFragment conversationFragment; + private InputPanelViewHolder inputPanel; + private TextView titleView; + private ImageView imgMore, imBack; + private String targetId = ""; + private final int PERMISSION_REQUEST_CODE = 0; + private final int SELECT_VIDEO_REQUEST = 0x0002; + private final int SELECT_IMAGE_REQUEST = 0x0001; + private ArrayList mSelectImages = new ArrayList<>(); + private boolean isAdmin = false; + @Override + protected int getLayoutId() { + return R.layout.fragment_chat_conversation; + } + + @Override + protected int getDialogStyle() { + return R.style.dialog; + } + + @Override + protected boolean canCancel() { + return false; + } + + @Override + protected void setWindowAttributes(Window window) { + window.setWindowAnimations(R.style.bottomToTopAnim); + WindowManager.LayoutParams params = window.getAttributes(); + params.width = WindowManager.LayoutParams.MATCH_PARENT; + params.height = WindowManager.LayoutParams.WRAP_CONTENT; + params.gravity = Gravity.BOTTOM; + window.setAttributes(params); + } + + @Override + public void onActivityCreated(Bundle savedInstanceState) { + super.onActivityCreated(savedInstanceState); + + initView(); + initData(); + } + + /** + * 初始化 + */ + private void initView() { + // 添加会话界面 + targetId = getArguments().getString("targetId"); + conversationFragment = new PDLiveConversationFragment(); + conversationFragment.initConversation(targetId, Conversation.ConversationType.PRIVATE, null); + FragmentManager manager = getChildFragmentManager(); + FragmentTransaction transaction = manager.beginTransaction(); + transaction.replace(R.id.container, conversationFragment); + transaction.commit(); + inputPanel = (InputPanelViewHolder) findViewById(R.id.input_panel); + titleView = (TextView) findViewById(R.id.titleView); + imgMore = (ImageView) findViewById(R.id.img_more); + imBack = (ImageView) findViewById(R.id.btn_back); + + imgMore.setOnClickListener(this); + imBack.setOnClickListener(this); + + inputPanel.addMediaMessageCallback(new InputPanelViewHolder.MediaMessageCallback() { + @Override + public void choosePic(int intoIndex) { + jumpPic(intoIndex); + } + }); + } + + /** + * 数据的设置 + */ + private void initData() { + NoviceInstructorModel model = NoviceInstructorManager.get(getActivity()).getNoviceInstructor(); + if (model != null && !TextUtils.isEmpty(model.getMsgZdySendText())) { + inputPanel.setPresetInformation(model.getMsgZdySendText()); + } + //绑定聊天用户id + inputPanel.setTargetId(targetId); + //获取用户信息 + UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(targetId); + if (null != userInfo) { + titleView.setText(userInfo.getName()); + if (!TextUtils.isEmpty(userInfo.getExtra())) { + SearchUserBean userBean = GsonUtils.fromJson(userInfo.getExtra(), SearchUserBean.class); + //新手指导员 + if (!TextUtils.isEmpty(userBean.getIs_admin()) && TextUtils.equals(userBean.getIs_admin(), "1")) { + isAdmin = true; + imgMore.setVisibility(View.GONE); + AdjustEvent adjustEvent1 = new AdjustEvent("exlgn3"); + Adjust.trackEvent(adjustEvent1); + CommonHttpUtil.setAdvertisingChannels("exlgn3", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + FirebaseAnalytics.getInstance(mContext).logEvent("FS_director_read", null); + AppEventsLogger.newLogger(mContext).logEvent("FB_director_read"); + } + } + }); + + } else {//非指导员 + isAdmin = false; + imgMore.setVisibility(View.VISIBLE); + } + inputPanel.setAdmin(isAdmin); + Log.e("PDLiveConversation", userInfo.getExtra()); + } + } else { + titleView.setText("系統消息"); + inputPanel.setVisibility(View.GONE); + } + getDraft(); + } + + @Override + public void onClick(View v) { + int id = v.getId(); + //菜单 + if (id == R.id.img_more) { + IMLoginModel model = IMLoginManager.get(mContext).getUserInfo(); + new MenuPopuwWindow(getActivity()).setIsAdmin(model.getIsAdmin(), targetId).show(imgMore); + } else if (id == R.id.btn_back) {//返回 + dismiss(); + } + } + + //intoIndex 1=调用相机,2=照片选取,3=视频选取 + public void jumpPic(int intoIndex) { + //选择图片 + int isPermission1 = ContextCompat.checkSelfPermission(mContext, Manifest.permission.READ_EXTERNAL_STORAGE); + int isPermission2 = ContextCompat.checkSelfPermission(mContext, Manifest.permission.WRITE_EXTERNAL_STORAGE); + if (isPermission1 == PackageManager.PERMISSION_GRANTED && isPermission2 == PackageManager.PERMISSION_GRANTED) { + startActivity(intoIndex); + } else { + //申请权限 + ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, + Manifest.permission.WRITE_EXTERNAL_STORAGE}, PERMISSION_REQUEST_CODE); + } + } + + private void startActivity(int intoIndex) { + mSelectImages.clear(); + Intent intent = new Intent(mContext, SelectImageActivity.class); + intent.putParcelableArrayListExtra("selected_images", mSelectImages); + intent.putExtra("intoIndex", intoIndex); + if (intoIndex == 3) { + startActivityForResult(intent, SELECT_VIDEO_REQUEST); + } else { + startActivityForResult(intent, SELECT_IMAGE_REQUEST); + } + } + /** + * 获取草稿箱信息系 + */ + private void getDraft() { + RongIMClient.getInstance().getTextMessageDraft(Conversation.ConversationType.PRIVATE, targetId, new RongIMClient.ResultCallback() { + @Override + public void onSuccess(String s) { + if (!TextUtils.isEmpty(inputPanel.getPresetInformation())) + inputPanel.setPresetInformation(s); + } + + @Override + public void onError(RongIMClient.ErrorCode errorCode) { + + } + }); + } +} diff --git a/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java b/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java index 7492bfb7e..df87443dc 100644 --- a/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java +++ b/live/src/main/java/com/yunbao/live/event/LiveAudienceEvent.java @@ -17,6 +17,7 @@ public class LiveAudienceEvent extends BaseModel { private int liveType; private int liveTypeVal; + public int getLiveType() { return liveType; } diff --git a/live/src/main/java/com/yunbao/live/event/RecommendLiveRoomEvent.java b/live/src/main/java/com/yunbao/live/event/RecommendLiveRoomEvent.java new file mode 100644 index 000000000..06517d722 --- /dev/null +++ b/live/src/main/java/com/yunbao/live/event/RecommendLiveRoomEvent.java @@ -0,0 +1,21 @@ +package com.yunbao.live.event; + +import com.google.gson.annotations.SerializedName; +import com.yunbao.common.bean.BaseModel; + +/** + * 聊天界面跳转直播间 + */ +public class RecommendLiveRoomEvent extends BaseModel { + @SerializedName("liveuid") + private String liveuid; + + public String getLiveuid() { + return liveuid; + } + + public RecommendLiveRoomEvent setLiveuid(String liveuid) { + this.liveuid = liveuid; + return this; + } +} diff --git a/live/src/main/java/com/yunbao/live/views/RecommendLiveRoomProvider.java b/live/src/main/java/com/yunbao/live/views/RecommendLiveRoomProvider.java new file mode 100644 index 000000000..056add0b7 --- /dev/null +++ b/live/src/main/java/com/yunbao/live/views/RecommendLiveRoomProvider.java @@ -0,0 +1,78 @@ +package com.yunbao.live.views; + +import android.content.Context; +import android.net.Uri; +import android.text.Spannable; +import android.text.SpannableString; +import android.text.TextUtils; +import android.view.ViewGroup; + +import com.google.gson.Gson; +import com.yunbao.common.R; +import com.yunbao.common.bean.RecommendLiveRoomModel; +import com.yunbao.common.manager.imrongcloud.RecommendLiveRoom; +import com.yunbao.common.utils.Bus; +import com.yunbao.live.event.RecommendLiveRoomEvent; + +import org.greenrobot.eventbus.EventBus; + +import java.util.List; + +import io.rong.imkit.conversation.messgelist.provider.BaseMessageItemProvider; +import io.rong.imkit.model.UiMessage; +import io.rong.imkit.widget.adapter.IViewProviderListener; +import io.rong.imkit.widget.adapter.ViewHolder; +import io.rong.imlib.model.MessageContent; + +/** + * 自定义消息模板 + */ +public class RecommendLiveRoomProvider extends BaseMessageItemProvider { + private Context mContext; + + public RecommendLiveRoomProvider(Context context) { + this.mContext = context; + } + + @Override + protected ViewHolder onCreateMessageContentViewHolder(ViewGroup viewGroup, int i) { + + return ViewHolder.createViewHolder(mContext, viewGroup, R.layout.view_recommend_live_room); + } + + @Override + protected void bindMessageContentViewHolder(ViewHolder viewHolder, ViewHolder viewHolder1, RecommendLiveRoom recommendLiveRoom, UiMessage uiMessage, int i, List list, IViewProviderListener iViewProviderListener) { + if (uiMessage.getMessage().getContent() instanceof RecommendLiveRoom) { + + RecommendLiveRoom liveRoom = (RecommendLiveRoom) uiMessage.getMessage().getContent(); + RecommendLiveRoomModel model = new Gson().fromJson(liveRoom.getContent(), RecommendLiveRoomModel.class); + viewHolder.setImageUri(R.id.live_bg, Uri.parse(model.getAvatar())); + viewHolder.setText(R.id.host_name, model.getUserNicename()); + } + } + + @Override + protected boolean onItemClick(ViewHolder viewHolder, RecommendLiveRoom recommendLiveRoom, UiMessage uiMessage, int i, List list, IViewProviderListener iViewProviderListener) { + if (uiMessage.getMessage().getContent() instanceof RecommendLiveRoom) { + RecommendLiveRoom liveRoom = (RecommendLiveRoom) uiMessage.getMessage().getContent(); + RecommendLiveRoomModel model = new Gson().fromJson(liveRoom.getContent(), RecommendLiveRoomModel.class); + Bus.get().post(new RecommendLiveRoomEvent().setLiveuid(model.getLiveuid())); + EventBus.getDefault().post(new RecommendLiveRoomEvent().setLiveuid(model.getLiveuid())); + } + return true; + } + + @Override + protected boolean isMessageViewType(MessageContent messageContent) { + return messageContent instanceof RecommendLiveRoom; + } + + @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); + } + return new SpannableString(politicalInstructor + mContext.getString(R.string.live_room_air_ticket)); + } +} diff --git a/live/src/main/res/layout/fragment_chat_conversation.xml b/live/src/main/res/layout/fragment_chat_conversation.xml new file mode 100644 index 000000000..8c8ad3e10 --- /dev/null +++ b/live/src/main/res/layout/fragment_chat_conversation.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/live/src/main/res/layout/rc_conversationlist_item.xml b/live/src/main/res/layout/rc_conversationlist_item.xml index 93ebf0431..331e14de7 100644 --- a/live/src/main/res/layout/rc_conversationlist_item.xml +++ b/live/src/main/res/layout/rc_conversationlist_item.xml @@ -10,9 +10,9 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginStart="8dp" - android:visibility="gone" android:layout_marginTop="5dp" - android:layout_marginEnd="8dp"> + android:layout_marginEnd="8dp" + android:visibility="gone"> diff --git a/live/src/main/res/layout/view_input_panel.xml b/live/src/main/res/layout/view_input_panel.xml index 39edf6596..9a979e213 100644 --- a/live/src/main/res/layout/view_input_panel.xml +++ b/live/src/main/res/layout/view_input_panel.xml @@ -35,6 +35,7 @@ android:layout_marginEnd="5dp" android:layout_marginBottom="6.5dp" android:layout_weight="1" + android:textColor="#161616" android:background="@drawable/rc_ext_panel_editbox_background" android:maxLines="4" /> diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index d46603ece..1db750513 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -23,24 +23,16 @@ import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; -import android.widget.Toast; import androidx.annotation.NonNull; -import androidx.annotation.Nullable; import androidx.annotation.RequiresApi; import androidx.viewpager.widget.ViewPager; -import com.adjust.sdk.Adjust; -import com.adjust.sdk.AdjustEvent; import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import com.android.billingclient.api.BillingResult; import com.android.billingclient.api.Purchase; -import com.android.billingclient.api.PurchaseHistoryRecord; -import com.android.billingclient.api.PurchaseHistoryResponseListener; import com.android.billingclient.api.SkuDetails; -import com.facebook.appevents.AppEventsConstants; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; import com.google.firebase.messaging.FirebaseMessaging; @@ -53,7 +45,6 @@ import com.tencent.imsdk.v2.V2TIMSDKConfig; import com.tencent.imsdk.v2.V2TIMSDKListener; import com.tencent.imsdk.v2.V2TIMUserFullInfo; import com.yunbao.common.CommonAppConfig; -import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.activity.WebViewActivity; @@ -140,17 +131,12 @@ import io.reactivex.disposables.Disposable; import io.rong.imkit.config.RongConfigCenter; import io.rong.imkit.notification.NotificationConfig; import io.rong.imlib.RongIMClient; -import kotlin.Unit; - -import static com.yunbao.common.CommonAppContext.isReady; -import static com.yunbao.common.CommonAppContext.logger; -import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; -import static com.yunbao.live.activity.SystemMessageActivity.type; - import io.rong.imlib.model.Message; import io.rong.push.PushManager; import io.rong.push.PushType; -import kotlin.*; +import kotlin.Unit; + +import static com.yunbao.common.CommonAppContext.isReady; @Route(path = RouteUtil.PATH_MAIN) public class MainActivity extends AbsActivity implements MainAppBarLayoutListener { @@ -242,9 +228,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene @Override public boolean onRecheck(@NonNull String skuType, @NonNull Purchase purchase, boolean isSelf) { - Log.e(TAG,purchase.getSku()+"s"+purchase.getOrderId()+"sds"+purchase.getPurchaseToken()); + Log.e(TAG, purchase.getSku() + "s" + purchase.getOrderId() + "sds" + purchase.getPurchaseToken()); //谷歌掉单处理 - CommonHttpUtil.Google_sec_pay(purchase.getPurchaseToken(),purchase.getOrderId(),purchase.getSku(),new HttpCallback() { + CommonHttpUtil.Google_sec_pay(purchase.getPurchaseToken(), purchase.getOrderId(), purchase.getSku(), new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -341,7 +327,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene RCRTCConfig.Builder config = RCRTCConfig.Builder.create(); RCRTCEngine.getInstance().init(MainActivity.this, config.build()); //推送跳直播间 - if(getIntent().getStringExtra("liveid")!=null){ + if (getIntent().getStringExtra("liveid") != null) { LiveHttpUtil.getLiveInfo(getIntent().getStringExtra("liveid") + "", new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -365,13 +351,13 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene } } }); - }else if(getIntent().getStringExtra("type")!=null&&getIntent().getStringExtra("type").equals("2")){ + } else if (getIntent().getStringExtra("type") != null && getIntent().getStringExtra("type").equals("2")) { //跳转消息列表 Bundle bundle = new Bundle(); bundle.putInt(PDLiveConversationListActivity.MESSAGENUMBER, messageNumber); bundle.putInt(PDLiveConversationListActivity.NUMBERME, numberMe); ConversationIMListManager.get(this).jumpConversationList(bundle); - }else if(getIntent().getStringExtra("type")!=null&&getIntent().getStringExtra("type").equals("8")){ + } else if (getIntent().getStringExtra("type") != null && getIntent().getStringExtra("type").equals("8")) { WebViewActivity.forward(mContext, getIntent().getStringExtra("activityUrl"), true); } FirebaseMessaging.getInstance().getToken() diff --git a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java index ff86667ae..00eeb2ed8 100644 --- a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java @@ -44,11 +44,17 @@ import com.yunbao.common.manager.imrongcloud.MessageIMManager; import com.yunbao.common.utils.DeviceUtils; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.ProcessResultUtil; +import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; +import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.SystemMessageActivity; import com.yunbao.live.bean.ImUserBean; +import com.yunbao.live.bean.LiveBean; +import com.yunbao.live.event.RecommendLiveRoomEvent; import com.yunbao.live.http.ImHttpUtil; +import com.yunbao.live.http.LiveHttpUtil; +import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; import com.yunbao.main.R; import com.yunbao.main.adapter.SystemMessageAdapter; import com.yunbao.main.dialog.MainStartDialogFragment; @@ -193,7 +199,7 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. container.post(new Runnable() { @Override public void run() { - showGuideView(); +// showGuideView(); } }); } @@ -261,7 +267,7 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. textNewsNotice.setVisibility(View.VISIBLE); textNewsNotice.setText(userBean.getNum()); } - ImgLoader.display(mContext, userBean.getImage(), imgNewsNotice); + ImgLoader.display(mContext, userBean.getNewImage(), imgNewsNotice); ViewClicksAntiShake.clicksAntiShake(imgNewsNotice, () -> { type = userBean.getType(); netHandler.post(systemNumberRunnable); @@ -280,7 +286,7 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. textNewsInteraction.setVisibility(View.VISIBLE); textNewsInteraction.setText(userBean.getNum()); } - ImgLoader.display(mContext, userBean.getImage(), imgNewsInteraction); + ImgLoader.display(mContext, userBean.getNewImage(), imgNewsInteraction); ViewClicksAntiShake.clicksAntiShake(imgNewsInteraction, () -> { type = userBean.getType(); netHandler.post(systemNumberRunnable); @@ -299,7 +305,7 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. textNewsOnline.setVisibility(View.VISIBLE); textNewsOnline.setText(userBean.getNum()); } - ImgLoader.display(mContext, userBean.getImage(), imgNewsOnline); + ImgLoader.display(mContext, userBean.getNewImage(), imgNewsOnline); ViewClicksAntiShake.clicksAntiShake(imgNewsOnline, () -> { type = userBean.getType(); netHandler.post(systemNumberRunnable); @@ -585,4 +591,24 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. MessageIMManager.get(mContext).setSystemNumber(systemNumber); } + @Subscribe(threadMode = ThreadMode.MAIN) + public void onRecommendLiveRoomEvent(RecommendLiveRoomEvent event) { + LiveHttpUtil.getLiveInfo(event.getLiveuid(), new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0 && info.length > 0) { + LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); + LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean1, liveType, liveTypeVal, liveSdk) -> { + if (liveBean1 == null) { + return; + } + LiveAudienceActivity.forward(mContext, liveBean1, liveType, liveTypeVal, "", 0, liveSdk); + }); + mCheckLivePresenter.checkLive(liveBean); + } else { + RouteUtil.forwardUserHome(mContext, event.getLiveuid(), 0); + } + } + }); + } } diff --git a/main/src/main/java/com/yunbao/main/manager/imrongcloud/ConversationIMListManager.java b/main/src/main/java/com/yunbao/main/manager/imrongcloud/ConversationIMListManager.java index 9bba5a866..845713d7a 100644 --- a/main/src/main/java/com/yunbao/main/manager/imrongcloud/ConversationIMListManager.java +++ b/main/src/main/java/com/yunbao/main/manager/imrongcloud/ConversationIMListManager.java @@ -22,12 +22,14 @@ import com.yunbao.common.utils.RouteUtil; import com.yunbao.live.activity.PDLIiveChatActivity; import com.yunbao.live.activity.PDLiveConversationActivity; import com.yunbao.live.bean.SearchUserBean; +import com.yunbao.live.dialog.PDLIiveChatConversationFragment; import com.yunbao.main.activity.PDLiveConversationListActivity; import com.yunbao.main.dialog.ConversationPopuwWindow; import com.yunbao.main.utils.PDLiveCustomConversationProvider; import com.yunbao.main.utils.PDLiveMessageProcessor; import com.yunbao.main.utils.PDSightMessageItemProvider; +import java.util.ArrayList; import java.util.List; import io.rong.imkit.IMCenter; @@ -43,6 +45,7 @@ import io.rong.imkit.utils.RouteUtils; import io.rong.imkit.widget.adapter.ProviderManager; import io.rong.imlib.RongIMClient; import io.rong.imlib.model.Conversation; +import io.rong.imlib.model.MessageContent; import io.rong.imlib.model.UserInfo; import io.rong.sight.SightExtensionModule; @@ -71,6 +74,7 @@ public class ConversationIMListManager { RongExtensionManager.getInstance().registerExtensionModule(new SightExtensionModule()); //自定义小视频消息模板 RongConfigCenter.conversationConfig().replaceMessageProvider(SightMessageItemProvider.class, new PDSightMessageItemProvider()); + //会话列表监听事件 RongIM.setConversationListBehaviorListener(listener); } @@ -275,7 +279,16 @@ public class ConversationIMListManager { */ @Override public boolean onConversationClick(Context context, View view, BaseUiConversation baseUiConversation) { - jumpConversation((Activity) context, baseUiConversation.mCore.getTargetId()); + if (context instanceof PDLIiveChatActivity) { + Bundle bundle = new Bundle(); + bundle.putString("targetId", baseUiConversation.mCore.getTargetId()); + PDLIiveChatActivity activity = (PDLIiveChatActivity) context; + PDLIiveChatConversationFragment fragment = new PDLIiveChatConversationFragment(); + fragment.setArguments(bundle); + fragment.show(activity.getSupportFragmentManager(), "PDLIiveChatConversationFragment"); + } else { + jumpConversation((Activity) context, baseUiConversation.mCore.getTargetId()); + } return true; } }; diff --git a/main/src/main/java/com/yunbao/main/utils/PDLiveCustomConversationProvider.java b/main/src/main/java/com/yunbao/main/utils/PDLiveCustomConversationProvider.java index cd34f10ba..6142d3e55 100644 --- a/main/src/main/java/com/yunbao/main/utils/PDLiveCustomConversationProvider.java +++ b/main/src/main/java/com/yunbao/main/utils/PDLiveCustomConversationProvider.java @@ -64,7 +64,7 @@ public class PDLiveCustomConversationProvider extends BaseConversationProvider { holder.setText(R.id.conversation_title, userInfo.getName()); if (uiConversation.mCore.getLatestMessage() instanceof TextMessage) { TextMessage message = (TextMessage) uiConversation.mCore.getLatestMessage(); - holder.setText(R.id.rc_conversation_content, message.getContent()); + holder.setText(R.id.conversation_content, message.getContent()); } if (uiConversation.mCore.getUnreadMessageCount() == 0) { holder.setVisible(R.id.conversation_unread, false);