增加私聊风险提示背景,消息预览改为[风险提示]
(cherry picked from commit ec4172bdef671f727e78051bb326a61eccecb689)
This commit is contained in:
@@ -30,16 +30,6 @@ public class MsgViewHolderChatHint extends MsgViewHolderBase {
|
||||
tvContent = findViewById(R.id.tv_content);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int leftBackground() {
|
||||
return R.drawable.shape_f2f2f2_r_10;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int rightBackground() {
|
||||
return R.drawable.shape_f2f2f2_r_10;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isShowHeadImage() {
|
||||
return false;
|
||||
|
@@ -3,12 +3,14 @@ package com.yizhuan.erban.ui.im.recent;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.OrientationHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@@ -51,6 +53,7 @@ import com.yizhuan.xchat_android_core.im.RefreshInRoomListEvent;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.AssistantAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CarAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CarveUpGoldThirdLevelAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.ChatHintAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.LuckyMoneyTipsAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.NewbieHelloAttachment;
|
||||
@@ -466,10 +469,9 @@ public class RecentListFragment extends BaseFragment {
|
||||
return "[分享一条动态]";
|
||||
} else if (customAttachment.getFirst() == CUSTOM_MSG_RED_PACKAGE) {
|
||||
return "[您收到一个全服红包]";
|
||||
} else if (customAttachment instanceof ChatHintAttachment) {
|
||||
return "[风险提示]";
|
||||
}
|
||||
// else if (customAttachment.getFirst() == CUSTOM_MSG_PUSH_NOTIFIFICATION){
|
||||
// return null;//"[您收到一条邀请信息]";
|
||||
// }
|
||||
} else if (attachment instanceof AudioAttachment) {
|
||||
return "[语音]";
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="48dp"
|
||||
android:layout_marginEnd="48dp"
|
||||
tools:background="@drawable/shape_f2f2f2_r_10">
|
||||
android:background="@drawable/shape_f2f2f2_r_10">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
|
@@ -2,9 +2,11 @@ package com.yizhuan.tutu.room_chat.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
@@ -29,6 +31,7 @@ import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LoginEvent;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.AssistantAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CarAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.ChatHintAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.LuckyMoneyTipsAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.NewbieHelloAttachment;
|
||||
@@ -83,6 +86,7 @@ import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUS
|
||||
/**
|
||||
* 房间内私聊显示用的最近聊天列表
|
||||
* 发现萌新
|
||||
*
|
||||
* @author MadisonRong
|
||||
*/
|
||||
public class RoomMsgRecentListFragment extends BaseFragment {
|
||||
@@ -274,6 +278,8 @@ public class RoomMsgRecentListFragment extends BaseFragment {
|
||||
return "[您收到一条厅消息]";
|
||||
} else if (customAttachment instanceof SysMsgVoiceAttachment) {
|
||||
return "[声音瓶子审核消息]";
|
||||
} else if (customAttachment instanceof ChatHintAttachment) {
|
||||
return "[风险提示]";
|
||||
}
|
||||
} else if (attachment instanceof AudioAttachment) {
|
||||
return "[语音]";
|
||||
|
Reference in New Issue
Block a user