11111
This commit is contained in:
parent
133e45bc63
commit
838ae0815b
@ -124,8 +124,7 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
* 退出登录
|
* 退出登录
|
||||||
*/
|
*/
|
||||||
public void logout() {
|
public void logout() {
|
||||||
//添加融云连接状态监听
|
|
||||||
RongcloudIMManager.removeIMStatusListener();
|
|
||||||
//删除用户登录信息
|
//删除用户登录信息
|
||||||
deleteByKey(KEY_USER_INFO);
|
deleteByKey(KEY_USER_INFO);
|
||||||
//用户对象置空
|
//用户对象置空
|
||||||
|
@ -156,9 +156,6 @@ public class RongcloudIMManager {
|
|||||||
RongIM.setConnectionStatusListener(connectionStatusListener);
|
RongIM.setConnectionStatusListener(connectionStatusListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void removeIMStatusListener() {
|
|
||||||
RongIM.setConnectionStatusListener(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 监听 IM 连接状态,可根据连接状态进行不同业务处理
|
* 监听 IM 连接状态,可根据连接状态进行不同业务处理
|
||||||
|
@ -87,10 +87,10 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/rc_conversation_unread_bg"
|
android:id="@+id/rc_conversation_unread_bg"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="20dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="20dp"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
app:srcCompat="@mipmap/rc_unread_count_bg_normal" />
|
app:srcCompat="@drawable/rc_unread_count_bg_normal" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/rc_conversation_unread_count"
|
android:id="@+id/rc_conversation_unread_count"
|
||||||
|
@ -24,11 +24,13 @@ import com.yunbao.main.activity.PDLiveConversationListActivity;
|
|||||||
import com.yunbao.main.dialog.ConversationPopuwWindow;
|
import com.yunbao.main.dialog.ConversationPopuwWindow;
|
||||||
import com.yunbao.main.utils.PDLiveCustomConversationProvider;
|
import com.yunbao.main.utils.PDLiveCustomConversationProvider;
|
||||||
import com.yunbao.main.utils.PDLiveMessageProcessor;
|
import com.yunbao.main.utils.PDLiveMessageProcessor;
|
||||||
|
import com.yunbao.main.utils.PDSightMessageItemProvider;
|
||||||
|
|
||||||
import io.rong.imkit.RongIM;
|
import io.rong.imkit.RongIM;
|
||||||
import io.rong.imkit.config.ConversationListBehaviorListener;
|
import io.rong.imkit.config.ConversationListBehaviorListener;
|
||||||
import io.rong.imkit.config.RongConfigCenter;
|
import io.rong.imkit.config.RongConfigCenter;
|
||||||
import io.rong.imkit.conversation.extension.RongExtensionManager;
|
import io.rong.imkit.conversation.extension.RongExtensionManager;
|
||||||
|
import io.rong.imkit.conversation.messgelist.provider.SightMessageItemProvider;
|
||||||
import io.rong.imkit.conversationlist.model.BaseUiConversation;
|
import io.rong.imkit.conversationlist.model.BaseUiConversation;
|
||||||
import io.rong.imkit.conversationlist.provider.PrivateConversationProvider;
|
import io.rong.imkit.conversationlist.provider.PrivateConversationProvider;
|
||||||
import io.rong.imkit.userinfo.RongUserInfoManager;
|
import io.rong.imkit.userinfo.RongUserInfoManager;
|
||||||
@ -59,6 +61,8 @@ public class ConversationIMListManager {
|
|||||||
providerManager.replaceProvider(PrivateConversationProvider.class, new PDLiveCustomConversationProvider());
|
providerManager.replaceProvider(PrivateConversationProvider.class, new PDLiveCustomConversationProvider());
|
||||||
//注册小视频模块
|
//注册小视频模块
|
||||||
RongExtensionManager.getInstance().registerExtensionModule(new SightExtensionModule());
|
RongExtensionManager.getInstance().registerExtensionModule(new SightExtensionModule());
|
||||||
|
//自定义小视频消息模板
|
||||||
|
RongConfigCenter.conversationConfig().replaceMessageProvider(SightMessageItemProvider.class, new PDSightMessageItemProvider());
|
||||||
//会话列表监听事件
|
//会话列表监听事件
|
||||||
RongIM.setConversationListBehaviorListener(listener);
|
RongIM.setConversationListBehaviorListener(listener);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,8 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -43,6 +45,10 @@ public class PDLiveCustomConversationProvider extends BaseConversationProvider {
|
|||||||
//根据业务需要,自定义处理
|
//根据业务需要,自定义处理
|
||||||
super.bindViewHolder(holder, uiConversation, position, list, listener);
|
super.bindViewHolder(holder, uiConversation, position, list, listener);
|
||||||
ImageView readReceipt = holder.itemView.findViewById(com.yunbao.live.R.id.rc_conversation_read_receipt);
|
ImageView readReceipt = holder.itemView.findViewById(com.yunbao.live.R.id.rc_conversation_read_receipt);
|
||||||
|
ImageView conversationUnread = holder.itemView.findViewById(com.yunbao.live.R.id.rc_conversation_unread_bg);
|
||||||
|
if (conversationUnread!=null){
|
||||||
|
Glide.with(holder.getContext()).asDrawable().load(R.mipmap.rc_unread_count_bg_normal).into(conversationUnread);
|
||||||
|
}
|
||||||
|
|
||||||
readReceipt.setVisibility(View.VISIBLE);
|
readReceipt.setVisibility(View.VISIBLE);
|
||||||
if (RongConfigCenter.featureConfig().isReadReceiptConversationType(Conversation.ConversationType.PRIVATE) &&
|
if (RongConfigCenter.featureConfig().isReadReceiptConversationType(Conversation.ConversationType.PRIVATE) &&
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.yunbao.main.utils;
|
||||||
|
|
||||||
|
import io.rong.imkit.conversation.messgelist.provider.SightMessageItemProvider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义小视频消息模板
|
||||||
|
*/
|
||||||
|
public class PDSightMessageItemProvider extends SightMessageItemProvider {
|
||||||
|
public PDSightMessageItemProvider() {
|
||||||
|
super();
|
||||||
|
//添加小视频已读回执
|
||||||
|
mConfig.showReadState = true;
|
||||||
|
}
|
||||||
|
}
|
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/red_point"
|
android:id="@+id/red_point"
|
||||||
android:layout_width="23dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_below="@id/time"
|
android:layout_below="@id/time"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
|
Loading…
Reference in New Issue
Block a user