diff --git a/common/src/main/java/com/yunbao/common/bean/VipModel.java b/common/src/main/java/com/yunbao/common/bean/VipModel.java index 535c7dd08..21fe92757 100644 --- a/common/src/main/java/com/yunbao/common/bean/VipModel.java +++ b/common/src/main/java/com/yunbao/common/bean/VipModel.java @@ -10,6 +10,9 @@ public class VipModel extends BaseModel { @SerializedName("type") private String type = ""; + @SerializedName("admin_id") + private String adminId; + public String getType() { return type; } @@ -18,4 +21,13 @@ public class VipModel extends BaseModel { this.type = type; return this; } + + public String getAdminId() { + return adminId; + } + + public VipModel setAdminId(String adminId) { + this.adminId = adminId; + return this; + } } diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index 70716c535..65307f2ff 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -14,6 +14,7 @@ import com.yunbao.common.bean.NobleTrumpetModel; import com.yunbao.common.bean.SearchModel; import com.yunbao.common.bean.SetAttentsModel; import com.yunbao.common.bean.SlideInBannerModel; +import com.yunbao.common.bean.VipModel; import java.util.List; @@ -189,7 +190,6 @@ public interface PDLiveApi { /** * 获取推送关注的开关和关注列表 - * */ @GET("/api/public/?service=Tx.offlineMsgSwitchDetail") Observable> getMsgSwitchDetail(); @@ -198,18 +198,31 @@ public interface PDLiveApi { * 推送关注的开关设置 */ @GET("/api/public/?service=Tx.setMsgMasterSwitch") - Observable> setMsgMasterSwitch(@Query("status") String status,@Query("type") String type); + Observable> setMsgMasterSwitch(@Query("status") String status, @Query("type") String type); /** - *开播推送设置开关 + * 开播推送设置开关 */ @GET("/api/public/?service=Tx.setBeginShowMsgSwitch") - Observable>> setBeginShowMsgSwitch(@Query("status") String status,@Query("isAll") String isAll,@Query("liveuid") String liveuid); + Observable>> setBeginShowMsgSwitch(@Query("status") String status, @Query("isAll") String isAll, @Query("liveuid") String liveuid); /** * 小时榜接口 + * * @param liveuid 直播间id */ @GET("/api/public/?service=Live.getHourChartRank") - Observable>> getHourChartRank(@Query("liveuid")String liveuid); + Observable>> getHourChartRank(@Query("liveuid") String liveuid); + + /** + * 清除系统消息的未读数 + */ + @GET("/api/public/?service=Message.setMessageReadAll") + Observable>> setMessageReadAll(); + + /** + * 获取当前用户指导员ID + */ + @GET("/api/public/?service=User.getUserInstructor") + Observable>> getUserInstructor(); } diff --git a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java index 72d1e8942..9273db11c 100644 --- a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java @@ -7,6 +7,7 @@ import com.yunbao.common.bean.BaseModel; import com.yunbao.common.bean.LiveInfoModel; import com.yunbao.common.bean.NobleTrumpetModel; import com.yunbao.common.bean.SetAttentsModel; +import com.yunbao.common.bean.VipModel; import com.yunbao.common.http.API; import com.yunbao.common.http.base.HttpCallback; @@ -153,4 +154,39 @@ public class LiveNetManager { callback.onError(throwable.getMessage()); }).isDisposed(); } + + /** + * 清除系统消息的未读数 + */ + public void setMessageReadAll(HttpCallback callback) { + API.get().pdLiveApi(mContext).setMessageReadAll() + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(listResponseModel -> { + if (callback != null) + callback.onSuccess(null); + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + if (callback != null) + callback.onError(throwable.getMessage()); + } + }).isDisposed(); + } + + /** + * 获取当前用户指导员ID + */ + public void getUserInstructor(HttpCallback> callback) { + API.get().pdLiveApi(mContext).getUserInstructor() + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(listResponseModel -> { + if (callback != null) + callback.onSuccess(listResponseModel.getData().getInfo()); + }, throwable -> { + if (callback != null) + callback.onError(throwable.getMessage()); + }).isDisposed(); + } } 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 4494d6149..d7f055a1e 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 @@ -32,9 +32,9 @@ import static com.yunbao.common.CommonAppContext.isReady; */ public class RongcloudIMManager { //融云开发者平台注册app唯一识别符 - public static final String RONG_IM_KEY = "uwd1c0sxu1p71"; +// public static final String RONG_IM_KEY = "uwd1c0sxu1p71"; //测试环境 -// public static final String RONG_IM_KEY = "pvxdm17jpd3hr"; + public static final String RONG_IM_KEY = "pvxdm17jpd3hr"; private static final String CLASSNAME = "RongcloudIMManager"; diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 8748fdc6a..0f99673a3 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -883,4 +883,6 @@ 屏蔽禮物特效 屏蔽座駕特效 您已在當前直播間 + 是否清空未讀消息 + diff --git a/config.gradle b/config.gradle index 7d7250467..cf3f0a090 100644 --- a/config.gradle +++ b/config.gradle @@ -10,9 +10,9 @@ ext { manifestPlaceholders = [ //正式 - serverHost : "https://napi.yaoulive.com", +// serverHost : "https://napi.yaoulive.com", //測試 -// serverHost : "https://ceshi.yaoulive.com", + serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", 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 190848f67..11a236b47 100644 --- a/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/PDLIiveChatActivity.java @@ -1,6 +1,5 @@ package com.yunbao.live.activity; -import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.text.TextUtils; @@ -26,14 +25,12 @@ 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.DpUtil; import com.yunbao.live.R; import com.yunbao.live.adapter.SystemChatMessageAdapter; import com.yunbao.live.bean.ImUserBean; import com.yunbao.live.bean.SearchUserBean; import com.yunbao.live.http.ImHttpUtil; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -46,11 +43,9 @@ import io.rong.imlib.model.UserInfo; * 直播页面聊天列表 */ public class PDLIiveChatActivity extends FragmentActivity { - private MyConversationListFragment conversationListFragment; + private ConversationListFragment conversationListFragment; private FrameLayout container; private PDLIiveChatActivity mContext; - private boolean isGetSystemMsg=true;//是否展示系统消息,默认为true - private boolean isDialogWindow=false;//是否为半屏展示,默认为false @Override protected void onCreate(@Nullable Bundle savedInstanceState) { @@ -58,14 +53,6 @@ public class PDLIiveChatActivity extends FragmentActivity { requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_pd_chat); mContext = this; - Intent intent = getIntent(); - if(intent!=null) { - isGetSystemMsg =intent.getBooleanExtra("systemMsg",true); - isDialogWindow =intent.getBooleanExtra("dialogWindow",false); - }else{ - isGetSystemMsg=true; - isDialogWindow=false; - } windowColor(); initView(); initData(); @@ -89,6 +76,15 @@ public class PDLIiveChatActivity extends FragmentActivity { getWindow().setAttributes(lp); setFinishOnTouchOutside(true);//允许点击空白处关闭 + //展示会话列表 + conversationListFragment = new ConversationListFragment(); + FragmentManager manager = getSupportFragmentManager(); + FragmentTransaction transaction = manager.beginTransaction(); + transaction.replace(R.id.container, conversationListFragment); + transaction.commit(); + //自定义空数据背景View + conversationListFragment.setEmptyView(com.yunbao.live.R.layout.view_layout_msg); + } /** @@ -103,25 +99,21 @@ public class PDLIiveChatActivity extends FragmentActivity { */ private void initData() { IMLoginManager.get(mContext).checkInstructor(); - //获取系统消息列表 - if(isGetSystemMsg) { - ImHttpUtil.getImUserInfo("", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - container.post(new Runnable() { - @Override - public void run() { - List listUserBean = JSON.parseArray(Arrays.toString(info), ImUserBean.class); - addSystemMessagesView(listUserBean); - } - }); - } - } - }); - }else{ - addSystemMessagesView(new ArrayList<>()); - } +// //获取系统消息列表 +// ImHttpUtil.getImUserInfo("", new HttpCallback() { +// @Override +// public void onSuccess(int code, String msg, String[] info) { +// if (code == 0) { +// container.post(new Runnable() { +// @Override +// public void run() { +// List listUserBean = JSON.parseArray(Arrays.toString(info), ImUserBean.class); +// addSystemMessagesView(listUserBean); +// } +// }); +// } +// } +// }); //刷新列表内用户信息 addUserInfoProvider(); @@ -138,10 +130,7 @@ public class PDLIiveChatActivity extends FragmentActivity { //倒序展示 Collections.reverse(listUserBean); //展示会话列表 - conversationListFragment = new MyConversationListFragment(); - Bundle bundle=new Bundle(); - bundle.putBoolean("dialogWindow",isDialogWindow); - conversationListFragment.setBundle(bundle); + conversationListFragment = new ConversationListFragment(); FragmentManager manager = getSupportFragmentManager(); FragmentTransaction transaction = manager.beginTransaction(); transaction.replace(R.id.container, conversationListFragment); diff --git a/live/src/main/res/drawable/background_system_message.xml b/live/src/main/res/drawable/background_system_message.xml new file mode 100644 index 000000000..6fa2f466e --- /dev/null +++ b/live/src/main/res/drawable/background_system_message.xml @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/live/src/main/res/layout/activity_pd_chat.xml b/live/src/main/res/layout/activity_pd_chat.xml index 884c302e1..aaeaa2496 100644 --- a/live/src/main/res/layout/activity_pd_chat.xml +++ b/live/src/main/res/layout/activity_pd_chat.xml @@ -1,24 +1,37 @@ - - + app:cardBackgroundColor="@color/white" + app:cardCornerRadius="8dp" + app:cardElevation="0dp"> + + + + + - \ No newline at end of file + \ 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 ed57232d2..93ebf0431 100644 --- a/live/src/main/res/layout/rc_conversationlist_item.xml +++ b/live/src/main/res/layout/rc_conversationlist_item.xml @@ -1,23 +1,147 @@ - + android:layout_height="123dp"> - + android:layout_height="match_parent" + android:layout_marginStart="8dp" + android:visibility="gone" + android:layout_marginTop="5dp" + android:layout_marginEnd="8dp"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + android:layout_marginStart="16dp" + android:layout_marginTop="39dp" + android:layout_marginEnd="15dp"> + + android:gravity="center_vertical"> @@ -62,30 +184,18 @@ - - + android:layout_below="@id/rc_conversation_linear" + android:layout_marginStart="88dp" + android:gravity="center_vertical"> + android:textSize="@dimen/rc_font_nav_or_date_size" /> @@ -150,8 +260,9 @@ android:layout_height="0.5dp" android:layout_marginTop="71.5dp" android:background="@color/rc_divider_color" + android:visibility="gone" app:layout_constraintStart_toStartOf="@id/rc_conversation_linear" app:layout_constraintTop_toTopOf="parent" /> - + - \ No newline at end of file + \ No newline at end of file diff --git a/live/src/main/res/mipmap-xxxhdpi/img_news_instructor_tags_chinese.png b/live/src/main/res/mipmap-xxxhdpi/img_news_instructor_tags_chinese.png new file mode 100644 index 000000000..c9fa58235 Binary files /dev/null and b/live/src/main/res/mipmap-xxxhdpi/img_news_instructor_tags_chinese.png differ diff --git a/live/src/main/res/mipmap-xxxhdpi/img_news_instructor_tags_english.png b/live/src/main/res/mipmap-xxxhdpi/img_news_instructor_tags_english.png new file mode 100644 index 000000000..e92f53eab Binary files /dev/null and b/live/src/main/res/mipmap-xxxhdpi/img_news_instructor_tags_english.png differ diff --git a/live/src/main/res/mipmap-xxxhdpi/news_icon_clearance.png b/live/src/main/res/mipmap-xxxhdpi/news_icon_clearance.png new file mode 100644 index 000000000..1fb0f61bf Binary files /dev/null and b/live/src/main/res/mipmap-xxxhdpi/news_icon_clearance.png differ diff --git a/live/src/main/res/mipmap-xxxhdpi/white_bg.jpg b/live/src/main/res/mipmap-xxxhdpi/white_bg.jpg new file mode 100644 index 000000000..00bda509d Binary files /dev/null and b/live/src/main/res/mipmap-xxxhdpi/white_bg.jpg differ diff --git a/main/build.gradle b/main/build.gradle index 5664cbc1c..d022937e0 100644 --- a/main/build.gradle +++ b/main/build.gradle @@ -81,4 +81,6 @@ dependencies { implementation 'com.google.android.gms:play-services-auth:15.0.0' //Google 繁體簡體轉換庫 implementation files('libs/jcc-bate-0.7.3.jar') + //引导层 + implementation 'com.binioter:guideview:1.0.0' } diff --git a/main/src/main/assets/guide.svga b/main/src/main/assets/guide.svga new file mode 100644 index 000000000..671adb78d Binary files /dev/null and b/main/src/main/assets/guide.svga differ 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 810de03b9..d46603ece 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -577,6 +577,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene isfloatBannernet = false; } }); + //获取指导员账号 + ConversationIMListManager.get(this).getUserInstructor(this); } /** 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 7618e3dd3..ff86667ae 100644 --- a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java @@ -1,11 +1,17 @@ package com.yunbao.main.activity; +import android.app.Dialog; import android.content.Intent; import android.os.Bundle; +import android.os.Handler; +import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; import android.view.View; +import android.view.ViewGroup; import android.widget.FrameLayout; +import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.TextView; import androidx.fragment.app.FragmentManager; @@ -16,19 +22,31 @@ import androidx.recyclerview.widget.RecyclerView; import com.adjust.sdk.Adjust; import com.adjust.sdk.AdjustEvent; import com.alibaba.fastjson.JSON; +import com.binioter.guideview.Guide; +import com.binioter.guideview.GuideBuilder; import com.facebook.appevents.AppEventsLogger; import com.google.firebase.analytics.FirebaseAnalytics; +import com.opensource.svgaplayer.SVGADrawable; +import com.opensource.svgaplayer.SVGAImageView; +import com.opensource.svgaplayer.SVGAParser; +import com.opensource.svgaplayer.SVGAVideoEntity; import com.yunbao.common.activity.AbsActivity; +import com.yunbao.common.activity.WebViewActivity; import com.yunbao.common.bean.ImUserInfoModel; import com.yunbao.common.custom.TabButtonGroup; import com.yunbao.common.event.MessageIMEvent; import com.yunbao.common.event.UpdateTablePointMe; -import com.yunbao.common.http.CommonHttpUtil; +import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.manager.IMLoginManager; 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.ToastUtil; +import com.yunbao.common.views.weight.ViewClicksAntiShake; +import com.yunbao.live.activity.SystemMessageActivity; import com.yunbao.live.bean.ImUserBean; import com.yunbao.live.http.ImHttpUtil; import com.yunbao.main.R; @@ -36,11 +54,13 @@ import com.yunbao.main.adapter.SystemMessageAdapter; import com.yunbao.main.dialog.MainStartDialogFragment; import com.yunbao.main.event.PDLiveConversationListEvent; import com.yunbao.main.manager.imrongcloud.ConversationIMListManager; +import com.yunbao.main.views.MessageGuideView; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -52,7 +72,7 @@ import static com.yunbao.common.CommonAppContext.isReady; /** * pdlive消息中心 */ -public class PDLiveConversationListActivity extends AbsActivity { +public class PDLiveConversationListActivity extends AbsActivity implements View.OnClickListener { //菜单 private TabButtonGroup mTabButtonGroup; public static String CLASSNAME = "PDLiveConversationListActivity", MESSAGENUMBER = "messageNumber", NUMBERME = "numberMe"; @@ -64,8 +84,16 @@ public class PDLiveConversationListActivity extends AbsActivity { private View redpointMe; private SystemMessageAdapter messageAdapter; private ProcessResultUtil mProcessResultUtil; + private TextView textNewsNotice, textNewsInteraction, textNewsOnline; + private ImageView newsIconClearance; + private Handler netHandler = new Handler(); + private String type = null; + private List listUserBean = new ArrayList<>(); + private LinearLayout topLayout; + private ImageView imgNewsNotice, imgNewsInteraction, imgNewsOnline; @Override + protected int getLayoutId() { return R.layout.activity_conversation_list; } @@ -77,6 +105,56 @@ public class PDLiveConversationListActivity extends AbsActivity { mContext = this; initView(); initData(); + + } + + //展示引导层 + private void showGuideView() { + MessageGuideView guideView = new MessageGuideView(this); + //top_noback + GuideBuilder builder = new GuideBuilder(); + builder.setTargetView(topLayout) + .setAlpha(180) + .setHighTargetCorner(20) + .setHighTargetPadding(10); + builder.setOverlayTarget(true); + builder.setAutoDismiss(false); + + builder.addComponent(guideView); + Guide guide = builder.createGuide(); + guide.show(this); + //引导界面设置 + View container = guideView.getContainer(); + SVGAImageView guidSvga = container.findViewById(R.id.guide_svga); + LinearLayout guideLayout = container.findViewById(R.id.guide_layout); + ImageView politicalInstructor = container.findViewById(R.id.political_instructor); + //设置界面宽度 + ViewGroup.LayoutParams layoutParams = guideLayout.getLayoutParams(); + layoutParams.width = DeviceUtils.getScreenWidth(mContext); + guideLayout.setLayoutParams(layoutParams); + //设置svga动图 + new SVGAParser(mContext).decodeFromAssets("guide.svga", new SVGAParser.ParseCompletion() { + @Override + public void onComplete(SVGAVideoEntity videoItem) { + SVGADrawable drawable = new SVGADrawable(videoItem); + guidSvga.setImageDrawable(drawable); + guidSvga.startAnimation(); + } + + @Override + public void onError() { + Log.e("errqs", "errl"); + } + }, null); + //点击事件 + ViewClicksAntiShake.clicksAntiShake(politicalInstructor, () -> { + String targetId = ConversationIMListManager.get(mContext).getTargetId(); + if (!TextUtils.isEmpty(targetId)) { + ConversationIMListManager.get(mContext).jumpConversation(mContext, targetId); + guide.dismiss(); + } + }); + } /** @@ -88,7 +166,14 @@ public class PDLiveConversationListActivity extends AbsActivity { container = findViewById(R.id.container); redPoint = findViewById(R.id.v_table_redpoint); redpointMe = findViewById(R.id.v_table_redpoint_me); - + textNewsNotice = findViewById(R.id.text_news_notice); + textNewsInteraction = findViewById(R.id.text_news_interaction); + textNewsOnline = findViewById(R.id.text_news_online); + newsIconClearance = findViewById(R.id.news_icon_clearance); + topLayout = findViewById(R.id.top_layout); + imgNewsNotice = findViewById(R.id.img_news_notice); + imgNewsInteraction = findViewById(R.id.img_news_interaction); + imgNewsOnline = findViewById(R.id.img_news_online); mTabButtonGroup.setCurPosition(2); findViewById(R.id.btn_start).setOnClickListener(v -> { //防止重新加载多个 @@ -104,39 +189,41 @@ public class PDLiveConversationListActivity extends AbsActivity { startActivity(new Intent(mContext, MainActivity.class)); } }); - + newsIconClearance.setOnClickListener(this); + container.post(new Runnable() { + @Override + public void run() { + showGuideView(); + } + }); } + private void showStartDialog() { if (isReady == true) { MainStartDialogFragment dialogFragment = new MainStartDialogFragment(); - dialogFragment.setMainStartChooseCallback(true,this); + dialogFragment.setMainStartChooseCallback(true, this); dialogFragment.show(getSupportFragmentManager(), "MainStartDialogFragment"); } else { ToastUtil.show("正在初始化,請稍等...."); } } + /** * 初始化数据 */ private void initData() { IMLoginManager.get(mContext).checkInstructor(); mProcessResultUtil = new ProcessResultUtil(this); - //获取系统消息列表 - ImHttpUtil.getImUserInfo("", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - container.post(new Runnable() { - @Override - public void run() { - List listUserBean = JSON.parseArray(Arrays.toString(info), ImUserBean.class); - addSystemMessagesView(listUserBean); - } - }); - } - } - }); + netHandler.post(imUserInfoRunnable); + //展示会话列表 + conversationListFragment = new ConversationListFragment(); + FragmentManager manager = getSupportFragmentManager(); + FragmentTransaction transaction = manager.beginTransaction(); + transaction.replace(R.id.container, conversationListFragment); + transaction.commit(); + //自定义空数据背景View + conversationListFragment.setEmptyView(com.yunbao.live.R.layout.view_layout_msg); //刷新列表内用户信息 ConversationIMListManager.get(mContext).addUserInfoProvider(); //消息中心 @@ -151,6 +238,147 @@ public class PDLiveConversationListActivity extends AbsActivity { MessageIMManager.get(this).getSystemMessages(); } + /** + * 系統消息獲取 + */ + private Runnable imUserInfoRunnable = new Runnable() { + @Override + public void run() { + //获取系统消息列表 + ImHttpUtil.getImUserInfo("", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + runOnUiThread(() -> { + listUserBean = JSON.parseArray(Arrays.toString(info), ImUserBean.class); + for (ImUserBean userBean : listUserBean) { + switch (userBean.getType()) { + //官方通知 + case "1": + if (TextUtils.isEmpty(userBean.getNum()) || TextUtils.equals("0", userBean.getNum())) { + textNewsNotice.setVisibility(View.GONE); + } else { + textNewsNotice.setVisibility(View.VISIBLE); + textNewsNotice.setText(userBean.getNum()); + } + ImgLoader.display(mContext, userBean.getImage(), imgNewsNotice); + ViewClicksAntiShake.clicksAntiShake(imgNewsNotice, () -> { + type = userBean.getType(); + netHandler.post(systemNumberRunnable); + startActivity(new Intent(mContext, SystemMessageActivity.class) + .putExtra("type", userBean.getType()) + .putExtra("uid", "") + .putExtra("title", userBean.getTitle()) + .putExtra("headImg", "")); + }); + break; + //互動消息 + case "2": + if (TextUtils.isEmpty(userBean.getNum()) || TextUtils.equals("0", userBean.getNum())) { + textNewsInteraction.setVisibility(View.GONE); + } else { + textNewsInteraction.setVisibility(View.VISIBLE); + textNewsInteraction.setText(userBean.getNum()); + } + ImgLoader.display(mContext, userBean.getImage(), imgNewsInteraction); + ViewClicksAntiShake.clicksAntiShake(imgNewsInteraction, () -> { + type = userBean.getType(); + netHandler.post(systemNumberRunnable); + startActivity(new Intent(mContext, SystemMessageActivity.class) + .putExtra("type", userBean.getType()) + .putExtra("uid", "") + .putExtra("title", userBean.getTitle()) + .putExtra("headImg", "")); + }); + break; + //在線客服 + case "3": + if (TextUtils.isEmpty(userBean.getNum()) || TextUtils.equals("0", userBean.getNum())) { + textNewsOnline.setVisibility(View.GONE); + } else { + textNewsOnline.setVisibility(View.VISIBLE); + textNewsOnline.setText(userBean.getNum()); + } + ImgLoader.display(mContext, userBean.getImage(), imgNewsOnline); + ViewClicksAntiShake.clicksAntiShake(imgNewsOnline, () -> { + type = userBean.getType(); + netHandler.post(systemNumberRunnable); + FirebaseAnalytics.getInstance(mContext).logEvent("FS_customer_service", null); + AppEventsLogger.newLogger(mContext).logEvent("FB_customer_service"); + AdjustEvent adjustEvent1 = new AdjustEvent("ww5z2p"); + Adjust.trackEvent(adjustEvent1); + if (userBean.getLink() != null && !"".equals(userBean.getLink())) { + WebViewActivity.forward(mContext, userBean.getLink()); + } else { + startActivity(new Intent(mContext, SystemMessageActivity.class) + .putExtra("type", userBean.getType()) + .putExtra("uid", "") + .putExtra("title", userBean.getTitle()) + .putExtra("headImg", "")); + } + }); + break; + } + } + + }); + + } + } + }); + } + }; + //修改小紅點 + private Runnable systemNumberRunnable = new Runnable() { + @Override + public void run() { + runOnUiThread(() -> { + int systemNumber = 0; + for (ImUserBean userBean : listUserBean) { + //未读消息数 + String number = userBean.getNum(); + + switch (userBean.getType()) { + //官方通知 + case "1": + if (TextUtils.equals(type, userBean.getType())) { + number = null; + textNewsNotice.setVisibility(View.GONE); + } + break; + //互動消息 + case "2": + if (TextUtils.equals(type, userBean.getType())) { + number = null; + textNewsInteraction.setVisibility(View.GONE); + } + break; + //在線客服 + case "3": + if (TextUtils.equals(type, userBean.getType())) { + number = null; + textNewsOnline.setVisibility(View.GONE); + } + break; + } + + //未读消息不为空并且大于0 + try { + if (!TextUtils.isEmpty(number) && Integer.parseInt(number) > 0) { + systemNumber = Integer.parseInt(number) + systemNumber; + } + } catch (NumberFormatException e) { + systemNumber = systemNumber + 0; + } + + } + type = null; + MessageIMManager.get(mContext).setSystemNumber(systemNumber); + }); + + } + }; + /** * 添加头部系统消息 * @@ -178,6 +406,46 @@ public class PDLiveConversationListActivity extends AbsActivity { conversationListFragment.addHeaderView(rootView); } + @Override + public void onClick(View v) { + ViewClicksAntiShake.clicksAntiShake(v, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + //清除全部消息 + if (v.getId() == R.id.news_icon_clearance) { + DialogUitl.showSimpleDialog(mContext, null, getString(R.string.clear_unread_messages), false, new DialogUitl.SimpleCallback3() { + @Override + public void onConfirmClick(Dialog dialog) { +// ConversationIMListManager.get(mContext).getConversationListByPage(true); + LiveNetManager.get(mContext) + .setMessageReadAll(new com.yunbao.common.http.base.HttpCallback() { + @Override + public void onSuccess(String data) { + textNewsNotice.setVisibility(View.GONE); + textNewsInteraction.setVisibility(View.GONE); + textNewsOnline.setVisibility(View.GONE); + } + + @Override + public void onError(String error) { + ToastUtil.show(error); + } + }); +// IMCenter.getInstance().clearMessagesUnreadStatus(); + MessageIMManager.get(mContext).setSystemNumber(0); + EventBus.getDefault().post(new MessageIMEvent().setNumber(0)); + } + + @Override + public void onCancel() { + + } + }); + } + } + }); + } + @Override protected void onDestroy() { super.onDestroy(); @@ -249,9 +517,9 @@ public class PDLiveConversationListActivity extends AbsActivity { public void onUpdateFieldEvent(UpdateTablePointMe updateTablePointMe) { if (redpointMe == null) return; if (updateTablePointMe.getPoint() == 0) { - redpointMe.setVisibility(View.VISIBLE); - } else { redpointMe.setVisibility(View.GONE); + } else { + redpointMe.setVisibility(View.VISIBLE); } } @@ -259,5 +527,62 @@ public class PDLiveConversationListActivity extends AbsActivity { @Subscribe(threadMode = ThreadMode.MAIN) public void onImUserInfoModel(ImUserInfoModel model) { messageAdapter.upDataMessage(model); + int systemNumber = 0; + for (ImUserBean userBean : listUserBean) { + //未读消息数 + String number = userBean.getNum(); + //未读消息不为空并且大于0 + try { + if (!TextUtils.isEmpty(number) && Integer.parseInt(number) > 0) { + systemNumber = Integer.parseInt(number) + systemNumber; + } + } catch (NumberFormatException e) { + systemNumber = systemNumber + 0; + } + } + switch (model.getType()) { + //官方通知 + case "1": + if (textNewsNotice.getVisibility() == View.GONE) { + textNewsNotice.setVisibility(View.GONE); + textNewsNotice.setText(""); + } else { + String number = textNewsNotice.getText().toString().trim(); + int numberInt = Integer.parseInt(number) + 1; + textNewsNotice.setVisibility(View.VISIBLE); + textNewsNotice.setText(String.valueOf(numberInt)); + } + + break; + //互動消息 + case "2": + if (textNewsInteraction.getVisibility() == View.GONE) { + textNewsInteraction.setVisibility(View.GONE); + textNewsInteraction.setText(""); + } else { + String number = textNewsInteraction.getText().toString().trim(); + int numberInt = Integer.parseInt(number) + 1; + textNewsInteraction.setVisibility(View.VISIBLE); + textNewsInteraction.setText(String.valueOf(numberInt)); + } + + + break; + //在線客服 + case "3": + if (textNewsOnline.getVisibility() == View.GONE) { + textNewsOnline.setVisibility(View.GONE); + textNewsOnline.setText(""); + } else { + String number = textNewsOnline.getText().toString().trim(); + int numberInt = Integer.parseInt(number) + 1; + textNewsOnline.setVisibility(View.VISIBLE); + textNewsOnline.setText(String.valueOf(numberInt)); + } + break; + } + systemNumber = systemNumber + 1; + MessageIMManager.get(mContext).setSystemNumber(systemNumber); + } } diff --git a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java index 21db96328..b0610618c 100644 --- a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java +++ b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java @@ -688,7 +688,16 @@ public class MainHttpUtil { HttpClient.getInstance().get("User.isInstructor", MainHttpConsts.ISINSTRUCTOR) .execute(callback); } + // + public static void setMessageReadAll(){ + HttpClient.getInstance().get("User.getUserInstructor","") + .execute(new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + } + }); + } } 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 9a5850d2b..9bba5a866 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 @@ -13,11 +13,12 @@ import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.GsonUtils; import com.google.gson.Gson; import com.yunbao.common.bean.IMLoginModel; +import com.yunbao.common.bean.VipModel; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.manager.InstructorRemarkManager; import com.yunbao.common.utils.RouteUtil; -import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.activity.PDLIiveChatActivity; import com.yunbao.live.activity.PDLiveConversationActivity; import com.yunbao.live.bean.SearchUserBean; @@ -27,6 +28,9 @@ import com.yunbao.main.utils.PDLiveCustomConversationProvider; import com.yunbao.main.utils.PDLiveMessageProcessor; import com.yunbao.main.utils.PDSightMessageItemProvider; +import java.util.List; + +import io.rong.imkit.IMCenter; import io.rong.imkit.RongIM; import io.rong.imkit.config.ConversationListBehaviorListener; import io.rong.imkit.config.RongConfigCenter; @@ -35,9 +39,9 @@ import io.rong.imkit.conversation.messgelist.provider.SightMessageItemProvider; import io.rong.imkit.conversationlist.model.BaseUiConversation; import io.rong.imkit.conversationlist.provider.PrivateConversationProvider; import io.rong.imkit.userinfo.RongUserInfoManager; -import io.rong.imkit.userinfo.UserDataProvider; 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.UserInfo; import io.rong.sight.SightExtensionModule; @@ -48,7 +52,8 @@ import io.rong.sight.SightExtensionModule; public class ConversationIMListManager { private static ConversationIMListManager manager; private Context mContext; - private Bundle bundle;//用户传输配置给会话界面 + //指导员ID + private String targetId; private ConversationIMListManager(Context context) { mContext = context; @@ -150,6 +155,9 @@ public class ConversationIMListManager { //使用空白字段存储自己服务器用户的所有的信息 userInfo.setExtra(GsonUtils.toJson(userBean)); RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo); + if (TextUtils.equals(userBean.getIs_admin(), "1")) { + setConversationToTop(userInfo.getUserId()); + } } } @@ -170,12 +178,12 @@ public class ConversationIMListManager { private void addUserInfoProvider(String userId, Activity context) { //获取用户信息 UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(userId); - if (null != userInfo){ + if (null != userInfo) { context.runOnUiThread(() -> { Conversation.ConversationType type = Conversation.ConversationType.PRIVATE; - RouteUtils.routeToConversationActivity(context, type, userId, bundle); + RouteUtils.routeToConversationActivity(context, type, userId, null); }); - }else { + } else { CommonHttpUtil.getUserBaseinfo(userId, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -195,6 +203,10 @@ public class ConversationIMListManager { userInfo.setExtra(GsonUtils.toJson(userBean)); RongUserInfoManager.getInstance().setUserInfoProvider(s -> { RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo); + if (TextUtils.equals(userBean.getIs_admin(), "1")) { + targetId = userId; + setConversationToTop(userInfo.getUserId()); + } return null; }, true); @@ -209,6 +221,14 @@ public class ConversationIMListManager { } + /** + * 消息置顶 + */ + private void setConversationToTop(String targetId) { + IMCenter.getInstance().setConversationToTop(Conversation.ConversationType.PRIVATE, targetId, true, false, null + ); + } + private ConversationListBehaviorListener listener = new ConversationListBehaviorListener() { @Override public boolean onConversationPortraitClick(Context context, Conversation.ConversationType conversationType, String targetId) { @@ -235,9 +255,17 @@ public class ConversationIMListManager { */ @Override public boolean onConversationLongClick(Context context, View view, BaseUiConversation baseUiConversation) { - new ConversationPopuwWindow((Activity) context) - .setIsAdmin(baseUiConversation.mCore.getTargetId()) - .show(view); + //非指导员都可以点击 + UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(baseUiConversation.mCore.getTargetId()); + if (userInfo != null && !TextUtils.isEmpty(userInfo.getExtra())) { + IMLoginModel model = new Gson().fromJson(userInfo.getExtra(), IMLoginModel.class); + if (!TextUtils.equals(model.getIsAdmin(), "1")) { + new ConversationPopuwWindow((Activity) context) + .setIsAdmin(baseUiConversation.mCore.getTargetId()) + .show(view); + } + } + return true; } @@ -247,15 +275,77 @@ public class ConversationIMListManager { */ @Override public boolean onConversationClick(Context context, View view, BaseUiConversation baseUiConversation) { - Object tag = view.getTag(); - if(tag!=null){ - bundle= (Bundle) tag; - }else{ - bundle=null; - } - ViewClicksAntiShake.clicksAntiShake(view, () -> jumpConversation((Activity) context, baseUiConversation.mCore.getTargetId())); + jumpConversation((Activity) context, baseUiConversation.mCore.getTargetId()); return true; } }; + private long timeStamp = 0; + + /** + * 获取当前指导员ID + */ + + public void getUserInstructor(Activity context) { + LiveNetManager.get(context) + .getUserInstructor(new com.yunbao.common.http.base.HttpCallback>() { + @Override + public void onSuccess(List data) { + if (data != null && data.size() > 0) { + targetId = data.get(0).getAdminId(); + } + } + + @Override + public void onError(String error) { + + } + }); + } + + /** + * 获取新手指导员账号(废弃,过时) + */ + @Deprecated + public void getConversationListByPage(boolean clearMessages) { + RongIMClient.getInstance().getConversationListByPage(new RongIMClient.ResultCallback>() { + @Override + public void onSuccess(List conversations) { + if (conversations != null && conversations.size() < 10) { + if (!clearMessages) { + for (Conversation conversation : conversations) { + UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(conversation.getTargetId()); + if (userInfo != null && !TextUtils.isEmpty(userInfo.getExtra())) { + IMLoginModel model = GsonUtils.fromJson(userInfo.getExtra(), IMLoginModel.class); + if (TextUtils.equals(model.getIsAdmin(), "1")) { + targetId = userInfo.getUserId(); + } + } + } + } else { + for (Conversation conversation : conversations) { + IMCenter.getInstance() + .clearMessagesUnreadStatus( + Conversation.ConversationType.PRIVATE, + conversation.getTargetId(), null); + } + } + + } else { + Conversation conversation = conversations.get(9); + timeStamp = conversation.getSentTime(); + } + } + + @Override + public void onError(RongIMClient.ErrorCode errorCode) { + + } + }, timeStamp, 10, Conversation.ConversationType.PRIVATE); + } + + + public String getTargetId() { + return targetId; + } } 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 b0afb8644..cd34f10ba 100644 --- a/main/src/main/java/com/yunbao/main/utils/PDLiveCustomConversationProvider.java +++ b/main/src/main/java/com/yunbao/main/utils/PDLiveCustomConversationProvider.java @@ -17,6 +17,7 @@ import io.rong.imkit.config.RongConfigCenter; import io.rong.imkit.conversationlist.model.BaseUiConversation; import io.rong.imkit.conversationlist.provider.BaseConversationProvider; import io.rong.imkit.userinfo.RongUserInfoManager; +import io.rong.imkit.utils.RongDateUtils; import io.rong.imkit.widget.adapter.IViewProviderListener; import io.rong.imkit.widget.adapter.ViewHolder; import io.rong.imlib.RongIMClient; @@ -24,6 +25,7 @@ import io.rong.imlib.model.Conversation; import io.rong.imlib.model.Message; import io.rong.imlib.model.UserInfo; import io.rong.message.RecallNotificationMessage; +import io.rong.message.TextMessage; /** * pdlive自定义会话模板 @@ -48,6 +50,36 @@ public class PDLiveCustomConversationProvider extends BaseConversationProvider { public void bindViewHolder(ViewHolder holder, BaseUiConversation uiConversation, int position, List list, IViewProviderListener listener) { //根据业务需要,自定义处理 super.bindViewHolder(holder, uiConversation, position, list, listener); + String targetId = uiConversation.mCore.getTargetId(); + UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(targetId); + if (userInfo != null && !TextUtils.isEmpty(userInfo.getExtra())) { + IMLoginModel model = new Gson().fromJson(userInfo.getExtra(), IMLoginModel.class); + //指导员对话逻辑 + if (model != null && TextUtils.equals(model.getIsAdmin(), "1")) { + holder.setBackgroundRes(R.id.administrator_layout, R.mipmap.img_news_instructor_bg); + holder.setBackgroundRes(R.id.rc_conversation_item, R.mipmap.white_bg); + holder.setVisible(R.id.rc_conversation_portrait_layout, false); + holder.setVisible(R.id.administrator_layout, true); + holder.setImageUri(R.id.img_administrator, userInfo.getPortraitUri()); + 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()); + } + if (uiConversation.mCore.getUnreadMessageCount() == 0) { + holder.setVisible(R.id.conversation_unread, false); + } else { + holder.setVisible(R.id.conversation_unread, true); + holder.setText(R.id.conversation_unread_count, String.valueOf(uiConversation.mCore.getUnreadMessageCount())); + } + + holder.setText(R.id.conversation_date, RongDateUtils.getConversationListFormatDate(uiConversation.mCore.getSentTime(), holder.getContext())); + } else { + //非指导员按照原有视图展示 + holder.setVisible(R.id.rc_conversation_portrait_layout, true); + holder.setVisible(R.id.administrator_layout, false); + } + } 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); ImageView imgNew = holder.itemView.findViewById(com.yunbao.live.R.id.img_new); @@ -55,8 +87,7 @@ public class PDLiveCustomConversationProvider extends BaseConversationProvider { Glide.with(holder.getContext()).asDrawable().load(R.mipmap.rc_unread_count_bg_normal).into(conversationUnread); } if (imgNew != null) { - String targetId = uiConversation.mCore.getTargetId(); - UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(targetId); + if (userInfo != null && !TextUtils.isEmpty(userInfo.getExtra())) { IMLoginModel model = new Gson().fromJson(userInfo.getExtra(), IMLoginModel.class); if (model != null && TextUtils.equals(model.getIsAdmin(), "1")) diff --git a/main/src/main/java/com/yunbao/main/views/MessageGuideView.java b/main/src/main/java/com/yunbao/main/views/MessageGuideView.java new file mode 100644 index 000000000..e02c6d7b5 --- /dev/null +++ b/main/src/main/java/com/yunbao/main/views/MessageGuideView.java @@ -0,0 +1,54 @@ +package com.yunbao.main.views; + +import android.app.Activity; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.LinearLayout; + +import com.binioter.guideview.Component; +import com.yunbao.common.utils.DeviceUtils; +import com.yunbao.main.R; + +/** + * 消息中心引导层 + */ +public class MessageGuideView implements Component { + private LinearLayout rootView; + private Activity mContext; + + public MessageGuideView(Activity mContext) { + this.mContext = mContext; + } + + public View getContainer() { + + return rootView; + } + + @Override + public View getView(LayoutInflater inflater) { + rootView = (LinearLayout) inflater.inflate(R.layout.view_message_guide, null); + + return rootView; + } + + @Override + public int getAnchor() { + return Component.ANCHOR_BOTTOM; + } + + @Override + public int getFitPosition() { + return Component.FIT_END; + } + + @Override + public int getXOffset() { + return 0; + } + + @Override + public int getYOffset() { + return 0; + } +} diff --git a/main/src/main/res/layout/activity_conversation_list.xml b/main/src/main/res/layout/activity_conversation_list.xml index 3da278b4a..d6c97524c 100644 --- a/main/src/main/res/layout/activity_conversation_list.xml +++ b/main/src/main/res/layout/activity_conversation_list.xml @@ -9,20 +9,120 @@ android:orientation="vertical" android:paddingTop="20dp"> - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/main/src/main/res/layout/view_message_guide.xml b/main/src/main/res/layout/view_message_guide.xml new file mode 100644 index 000000000..cac17d2da --- /dev/null +++ b/main/src/main/res/layout/view_message_guide.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/main/src/main/res/mipmap-xxhdpi/img_bg.png b/main/src/main/res/mipmap-xxhdpi/img_bg.png new file mode 100644 index 000000000..4cfd81109 Binary files /dev/null and b/main/src/main/res/mipmap-xxhdpi/img_bg.png differ diff --git a/main/src/main/res/mipmap-xxhdpi/img_news_instructor_bg.png b/main/src/main/res/mipmap-xxhdpi/img_news_instructor_bg.png new file mode 100644 index 000000000..4674fe610 Binary files /dev/null and b/main/src/main/res/mipmap-xxhdpi/img_news_instructor_bg.png differ diff --git a/main/src/main/res/mipmap-xxhdpi/img_news_interaction.png b/main/src/main/res/mipmap-xxhdpi/img_news_interaction.png new file mode 100644 index 000000000..6c808bbb6 Binary files /dev/null and b/main/src/main/res/mipmap-xxhdpi/img_news_interaction.png differ diff --git a/main/src/main/res/mipmap-xxhdpi/img_news_notice.png b/main/src/main/res/mipmap-xxhdpi/img_news_notice.png new file mode 100644 index 000000000..3c9b50d2b Binary files /dev/null and b/main/src/main/res/mipmap-xxhdpi/img_news_notice.png differ diff --git a/main/src/main/res/mipmap-xxhdpi/img_news_online.png b/main/src/main/res/mipmap-xxhdpi/img_news_online.png new file mode 100644 index 000000000..5ff00d7e5 Binary files /dev/null and b/main/src/main/res/mipmap-xxhdpi/img_news_online.png differ