11111
This commit is contained in:
parent
1007e2ab20
commit
b264001a44
@ -151,10 +151,10 @@ dependencies {
|
||||
//腾讯im
|
||||
api 'com.tencent.imsdk:imsdk-plus:5.4.666'
|
||||
api 'com.google.code.gson:gson:2.8.8'
|
||||
api 'cn.rongcloud.sdk:rtc_lib:5.2.3.2' // 音视频通话基础能力库
|
||||
api 'cn.rongcloud.sdk:rtc_lib:5.2.0' // 音视频通话基础能力库
|
||||
//此处以集成 5.1.2 版本为例
|
||||
api 'cn.rongcloud.sdk:im_lib:5.2.3.2' // 即时通讯基础能力库
|
||||
api 'cn.rongcloud.sdk:im_kit:5.2.3.2' // 即时通讯 UI 基础组件
|
||||
api 'cn.rongcloud.sdk:im_lib:5.1.3.10' // 即时通讯基础能力库
|
||||
api 'cn.rongcloud.sdk:im_kit:5.1.3.10' // 即时通讯 UI 基础组件
|
||||
api 'com.facebook.android:facebook-login:8.2.0'
|
||||
api 'com.facebook.android:facebook-android-sdk:[5,6)'
|
||||
|
||||
|
@ -47,6 +47,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginStart="@dimen/rc_margin_size_12"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -55,12 +56,11 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/rc_conversation_title">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rc_read_receipt_new"
|
||||
android:id="@+id/rc_conversation_read_receipt"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="4dp" />
|
||||
android:layout_marginEnd="4dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
<TextView
|
||||
@ -127,17 +127,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/rc_no_disturb" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rc_conversation_read_receipt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/rc_margin_size_2"
|
||||
android:layout_marginBottom="@dimen/rc_margin_size_12"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/rc_conversation_no_disturb"
|
||||
app:layout_goneMarginRight="@dimen/rc_margin_size_12"
|
||||
app:srcCompat="@drawable/rc_read_receipt" />
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -65,7 +65,7 @@ public class PDLiveConversationListActivity extends AbsActivity {
|
||||
EventBus.getDefault().register(this);
|
||||
mContext = this;
|
||||
initView();
|
||||
|
||||
initData();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -165,6 +165,7 @@ public class PDLiveConversationListActivity extends AbsActivity {
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -175,7 +176,7 @@ public class PDLiveConversationListActivity extends AbsActivity {
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
initData();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -186,7 +187,6 @@ public class PDLiveConversationListActivity extends AbsActivity {
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
conversationListFragment.onStop();
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,19 +1,25 @@
|
||||
package com.yunbao.main.utils;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.rong.imkit.config.RongConfigCenter;
|
||||
import io.rong.imkit.conversationlist.model.BaseUiConversation;
|
||||
import io.rong.imkit.conversationlist.provider.BaseConversationProvider;
|
||||
import io.rong.imkit.widget.adapter.IViewProviderListener;
|
||||
import io.rong.imkit.widget.adapter.ViewHolder;
|
||||
import io.rong.imlib.RongIMClient;
|
||||
import io.rong.imlib.model.Conversation;
|
||||
import io.rong.imlib.model.Message;
|
||||
import io.rong.message.RecallNotificationMessage;
|
||||
|
||||
/**
|
||||
* pdlive自定义会话模板
|
||||
@ -38,16 +44,29 @@ public class PDLiveCustomConversationProvider extends BaseConversationProvider {
|
||||
public void bindViewHolder(ViewHolder holder, BaseUiConversation uiConversation, int position, List<BaseUiConversation> list, IViewProviderListener<BaseUiConversation> listener) {
|
||||
//根据业务需要,自定义处理
|
||||
super.bindViewHolder(holder, uiConversation, position, list, listener);
|
||||
ImageView readReceipt = holder.itemView.findViewById(com.yunbao.live.R.id.rc_read_receipt_new);
|
||||
if (uiConversation.mCore.getLatestMessageDirection()==Message.MessageDirection.SEND) {
|
||||
Message.SentStatus sentStatus = uiConversation.mCore.getSentStatus();
|
||||
if (sentStatus == Message.SentStatus.READ) {
|
||||
ImageView readReceipt = holder.itemView.findViewById(com.yunbao.live.R.id.rc_conversation_read_receipt);
|
||||
// IMLoginModel userInfo = IMLoginManager.get(holder.getContext()).getUserInfo();
|
||||
// if (String.valueOf(userInfo.getId()).equals(uiConversation.mCore.getSenderUserId())) {
|
||||
// Message.SentStatus sentStatus = uiConversation.mCore.getSentStatus();
|
||||
// if (sentStatus == Message.SentStatus.READ) {
|
||||
//
|
||||
// } else {
|
||||
//
|
||||
// }
|
||||
// } else {
|
||||
// readReceipt.setVisibility(View.GONE);
|
||||
// }
|
||||
readReceipt.setVisibility(View.VISIBLE);
|
||||
if (RongConfigCenter.featureConfig().isReadReceiptConversationType(Conversation.ConversationType.PRIVATE) &&
|
||||
uiConversation.mCore.getSenderUserId().equals(RongIMClient.getInstance().getCurrentUserId()) &&
|
||||
uiConversation.mCore.getSentStatus().getValue() == Message.SentStatus.READ.getValue() &&
|
||||
!(uiConversation.mCore.getLatestMessage() instanceof RecallNotificationMessage)) {
|
||||
readReceipt.setBackgroundResource(com.yunbao.live.R.mipmap.icon_messagelist_read);
|
||||
} else {
|
||||
} else if (uiConversation.mCore.getSenderUserId().equals(RongIMClient.getInstance().getCurrentUserId()) &&
|
||||
!(uiConversation.mCore.getLatestMessage() instanceof RecallNotificationMessage)) {
|
||||
readReceipt.setBackgroundResource(com.yunbao.live.R.mipmap.icon_messagelist_unread);
|
||||
}
|
||||
}else {
|
||||
readReceipt.setVisibility(View.GONE);
|
||||
} else {
|
||||
holder.setVisible(R.id.rc_conversation_read_receipt, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,7 @@
|
||||
android:layout_width="0dp"
|
||||
app:RCStyle="CE"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
Loading…
Reference in New Issue
Block a user