From 269ad6e808677c5d81ef755b87dd3e11d3afe5d0 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Sun, 7 Apr 2024 14:46:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/shayu/phonelive/AppContext.java | 12 ++- .../manager/imrongcloud/MessageIMManager.java | 15 ++- .../imrongcloud/RongcloudIMManager.java | 2 +- .../utils/MessageSayHiNotifyManager.java | 2 +- .../drawable-xhdpi/rc_ic_bubble_right.9.png | Bin 2030 -> 333 bytes common/src/main/res/values-en-rUS/string.xml | 4 +- common/src/main/res/values-zh-rHK/strings.xml | 2 +- common/src/main/res/values-zh-rTW/strings.xml | 2 +- common/src/main/res/values-zh/strings.xml | 2 +- common/src/main/res/values/strings.xml | 4 +- .../res/layout/rc_conversationlist_item.xml | 3 +- .../activity/CompleteUserInfoActivity.java | 9 ++ .../yunbao/main/activity/MainActivity.java | 2 + .../MainMsgAddressBookListAdapter.java | 6 ++ .../res/layout/activity_edit_user_hobby.xml | 90 ++++++++---------- main/src/main/res/layout/view_homemain.xml | 3 +- 16 files changed, 94 insertions(+), 64 deletions(-) diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index a5b3e3925..6d804b727 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -88,6 +88,9 @@ 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.HQVoiceMessage; +import io.rong.message.ImageMessage; +import io.rong.message.SightMessage; import io.rong.message.TextMessage; //import cn.tillusory.sdk.TiSDK; @@ -280,7 +283,14 @@ public class AppContext extends CommonAppContext { content = new TextMessage(WordUtil.getNewString(R.string.activity_msg_chat_list_card)); } else if (message.getContent() instanceof TextMessage) { content = (TextMessage) message.getContent(); - }else{ + }else if(message.getContent() instanceof ImageMessage){ + content = new TextMessage(WordUtil.getNewString(R.string.rc_conversation_summary_content_image)); + }else if(message.getContent() instanceof SightMessage){ + content = new TextMessage(WordUtil.getNewString(R.string.rc_conversation_summary_content_sight)); + }else if(message.getContent() instanceof HQVoiceMessage){ + content = new TextMessage(WordUtil.getNewString(R.string.rc_conversation_summary_content_voice)); + }else { + System.out.println("未知消息类型:"+message.getContent().getClass().getSimpleName()+"|"+message.getContent()); return false; } if (content.getContent().contains("_method_")) { diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/MessageIMManager.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/MessageIMManager.java index ab87b670e..0d23a095b 100644 --- a/common/src/main/java/com/yunbao/common/manager/imrongcloud/MessageIMManager.java +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/MessageIMManager.java @@ -3,6 +3,7 @@ package com.yunbao.common.manager.imrongcloud; import android.app.Activity; import android.content.Context; import android.os.Handler; +import android.os.Looper; import android.text.TextUtils; import android.util.Log; import android.view.View; @@ -19,6 +20,7 @@ import com.yunbao.common.http.HttpClient; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.AppManager; import com.yunbao.common.utils.RouteUtil; +import com.yunbao.common.utils.ToastUtil; import org.greenrobot.eventbus.EventBus; @@ -100,13 +102,14 @@ public class MessageIMManager { @Override public void onSuccess(Integer integer) { imNumber = integer; + System.out.println(">>>>>>>>>未读数 "+integer); //发送通知 unreadMessagesHandler.post(essagesRunnable); } @Override public void onError(RongIMClient.ErrorCode e) { - + ToastUtil.showDebug(e.getMessage()); } }); @@ -214,6 +217,16 @@ public class MessageIMManager { //整合未读消息数目并且发送出去 private final Runnable essagesRunnable = () -> { number = imNumber + systemNumber; + /*if(AppManager.getInstance().getMainActivity()==null){ + new Handler(Looper.getMainLooper()).postDelayed(() -> { + DebugDialog.getInstance(AppManager.getInstance().getMainActivity()).setParams("消息", imNumber + ""); + DebugDialog.getInstance(AppManager.getInstance().getMainActivity()).setParams("系統", systemNumber + ""); + },300); + }else { + DebugDialog.getInstance(AppManager.getInstance().getMainActivity()).setParams("消息", imNumber + ""); + DebugDialog.getInstance(AppManager.getInstance().getMainActivity()).setParams("系統", systemNumber + ""); + }*/ + Log.i("未读消息", "消息: "+imNumber+" | 系统: "+systemNumber); EventBus.getDefault().post(new MessageIMEvent().setNumber(number).setMessage(imNumber)); }; 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 073f3d4cb..82f4b9a82 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 @@ -118,7 +118,7 @@ public class RongcloudIMManager { * @param context */ public static void connectIM(Context context) { - MessageIMManager.get(context).addImRongCloudObserver(); + // MessageIMManager.get(context).addImRongCloudObserver(); MessageIMManager.get(context).getSystemMessages(); IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo(); String IMToken = userInfo.getTokenRong(); diff --git a/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java b/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java index 0eb18135d..d1cdded48 100644 --- a/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java +++ b/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java @@ -70,7 +70,7 @@ public class MessageSayHiNotifyManager { return isInit; } - public synchronized void next() { + private synchronized void next() { Log.i(TAG, "next: 获取下一轮定时器信息&显示当前弹框"); LiveNetManager.get(AppManager.getInstance().getLastActivity()) .getMessageSayHiTimer(new HttpCallback() { diff --git a/common/src/main/res/drawable-xhdpi/rc_ic_bubble_right.9.png b/common/src/main/res/drawable-xhdpi/rc_ic_bubble_right.9.png index e8c25d7e21c182483ab6ac87290aecc4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3MgK(k~FJmi~<480dV&sv$b@zsDSa z0|J=AswLfS+4rLNs1@a0Bx{I#&;BC);@|C%t8s+trpwB{MD;n;-r&}&xW%i3a$d|< z!oT_*59Nw{Icx;)x)RB$mai)J-Nl+o>2iIdmfYwsef-T%Uzz9HjCuCXv?e);x%A+# zii`T>C<6U`uAWI8#&xZm$$yQwPmFsXB(cE`lcLk4)6;vyufOUixIp3pKk5II!rjJg z-3okwRnid@n;PX6>nO_%7HIcAR4>ygeZH$+Z`VLM_F>U`Q*7dWEVFB$0y%~};}9cU z-zEK~1>=Fdjq$6l+}eFZFACxUE7-2)L|xKmZlc0sVQAQbi(q`(4zP|Z>yS6UkIv31 zUSe#D&G{K52j0rd^_G=(p!kvw%(`Zbub$~XeNt}=5juMAS>HS{Ak2^@zObp#j4@j1 zqt7%ReQr#NJXaIfgyyeLEDarkO~mczRLOZiGMG#`@p7%^vdH1#?vDeUes#BhW*bER EH|5pHNB{r; diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index cd08f2dda..81a3a4f6a 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1058,11 +1058,11 @@ Limited ride And limited avatar frame Privacy Policy Terms and policies For details, please read the following message to install the application: - Welcome to PD LIVE. For your personal information and privacy, we will adopt the highest standards of treatment and protection. + Welcome to PandoraLive. For your personal information and privacy, we will adopt the highest standards of treatment and protection. In order to provide users with better services, our products integrate [Alliance SDK], SDK needs to collect your device information (IMEI/MAC/Android ID/IDFA/OpenUDID/GUID/IP address /SIM card IMSI information, etc.), In order for you to better understand the types and purposes of the data collected by [Alliance SDK] and how to protect your personal information, you can log on to: https://www.umeng.com/page/policy Learn about [Alliance SDK] Privacy Policy [Alliance +] Privacy Policy [Alliance +], a third-party global big data service provider, providing customers with PC/APP/ offline statistics, advertising effect monitoring, message push/micro community/sharing /IM and other operating tools,DIP, global index and industry reports. https://www.umeng.com/page/policy Clicking Agree means you have read and agree to all of the above.。 agreement - Welcome to PD LIVE. + Welcome to PandoraLive. gift User service agreement 一 Fan privilege 一 diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index d5173a2f3..ac78b6c8b 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1082,7 +1082,7 @@ 隱私條款 條款和政策 - 歡迎來到PD LIVE,對於您的個人信息及隱私,我們將採用最高標準對待和保護。 + 歡迎來到PandoraLive,對於您的個人信息及隱私,我們將採用最高標準對待和保護。 詳情請您閱讀以下安裝應用程序的消息: 為了給用戶提供更好的服務,我們的產品集成[友盟SDK],SDK需要收集您的设备信息(IMEI/MAC/Android ID/IDFA/OpenUDID/GUID/IP地址/SIM 卡 IMSI 信息等),為便於您更好地了解[友盟SDK]采集的數據類型及用途,以及何保護您的個人信息,您可以登陸:https://www.umeng.com/page/policy 了解[友盟SDK]隱私權政策【友盟+】隐私政策【友盟+】,第三方全域大数据服务提供商,为客户提供PC/APP/线下统计,广告效果监测,消息推送/微社区/分享/IM等运营工具,DIP,全域指数与行业报告等。https://www.umeng.com/page/policy 同意 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index db249b27a..2e7f05456 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1082,7 +1082,7 @@ 隱私條款 條款和政策 - 歡迎來到PD LIVE,對於您的個人信息及隱私,我們將採用最高標準對待和保護。 + 歡迎來到PandoraLive,對於您的個人信息及隱私,我們將採用最高標準對待和保護。 詳情請您閱讀以下安裝應用程序的消息: 為了給用戶提供更好的服務,我們的產品集成[友盟SDK],SDK需要收集您的设备信息(IMEI/MAC/Android ID/IDFA/OpenUDID/GUID/IP地址/SIM 卡 IMSI 信息等),為便於您更好地了解[友盟SDK]采集的數據類型及用途,以及何保護您的個人信息,您可以登陸:https://www.umeng.com/page/policy 了解[友盟SDK]隱私權政策【友盟+】隐私政策【友盟+】,第三方全域大数据服务提供商,为客户提供PC/APP/线下统计,广告效果监测,消息推送/微社区/分享/IM等运营工具,DIP,全域指数与行业报告等。https://www.umeng.com/page/policy 同意 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index a1f302679..919df0477 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1082,7 +1082,7 @@ 隱私條款 條款和政策 - 歡迎來到PD LIVE,對於您的個人信息及隱私,我們將採用最高標準對待和保護。 + 歡迎來到PandoraLive,對於您的個人信息及隱私,我們將採用最高標準對待和保護。 詳情請您閱讀以下安裝應用程序的消息: 為了給用戶提供更好的服務,我們的產品集成[友盟SDK],SDK需要收集您的设备信息(IMEI/MAC/Android ID/IDFA/OpenUDID/GUID/IP地址/SIM 卡 IMSI 信息等),為便於您更好地了解[友盟SDK]采集的數據類型及用途,以及何保護您的個人信息,您可以登陸:https://www.umeng.com/page/policy 了解[友盟SDK]隱私權政策【友盟+】隐私政策【友盟+】,第三方全域大数据服务提供商,为客户提供PC/APP/线下统计,广告效果监测,消息推送/微社区/分享/IM等运营工具,DIP,全域指数与行业报告等。https://www.umeng.com/page/policy 同意 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index bf25cee73..cf8be52e5 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1058,11 +1058,11 @@ Limited ride And limited avatar frame Privacy Policy Terms and policies For details, please read the following message to install the application: - Welcome to PD LIVE. For your personal information and privacy, we will adopt the highest standards of treatment and protection. + Welcome to PandoraLive. For your personal information and privacy, we will adopt the highest standards of treatment and protection. In order to provide users with better services, our products integrate [Alliance SDK], SDK needs to collect your device information (IMEI/MAC/Android ID/IDFA/OpenUDID/GUID/IP address /SIM card IMSI information, etc.), In order for you to better understand the types and purposes of the data collected by [Alliance SDK] and how to protect your personal information, you can log on to: https://www.umeng.com/page/policy Learn about [Alliance SDK] Privacy Policy [Alliance +] Privacy Policy [Alliance +], a third-party global big data service provider, providing customers with PC/APP/ offline statistics, advertising effect monitoring, message push/micro community/sharing /IM and other operating tools,DIP, global index and industry reports. https://www.umeng.com/page/policy Clicking Agree means you have read and agree to all of the above.。 agreement - Welcome to PD LIVE. + Welcome to PandoraLive. gift User service agreement 一 Fan privilege 一 diff --git a/live/src/main/res/layout/rc_conversationlist_item.xml b/live/src/main/res/layout/rc_conversationlist_item.xml index 18fa0a8d9..a1ce6d26d 100644 --- a/live/src/main/res/layout/rc_conversationlist_item.xml +++ b/live/src/main/res/layout/rc_conversationlist_item.xml @@ -14,7 +14,7 @@ android:id="@+id/rc_conversation_portrait_rl" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginStart="@dimen/rc_margin_size_12" + android:layout_marginTop="@dimen/rc_margin_size_12" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -107,7 +107,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/rc_margin_size_16" - android:layout_marginEnd="@dimen/rc_margin_size_12" android:text="3 月 22 日" android:textColor="@color/rc_auxiliary_color" android:textSize="@dimen/rc_font_nav_or_date_size" diff --git a/main/src/main/java/com/yunbao/main/activity/CompleteUserInfoActivity.java b/main/src/main/java/com/yunbao/main/activity/CompleteUserInfoActivity.java index 5785dbece..abfa024bf 100644 --- a/main/src/main/java/com/yunbao/main/activity/CompleteUserInfoActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/CompleteUserInfoActivity.java @@ -207,6 +207,10 @@ public class CompleteUserInfoActivity extends AbsActivity { avatar.setTag("https://downs.yaoulive.com/defaultblue.jpg"); avatarChange.setOnClickListener(view -> { UserAvatarPopup userAvatarPopup = new UserAvatarPopup(this, userAvatar1 -> { + if(StringUtil.isEmpty(userAvatar1)){ + ToastUtil.show(R.string.upload_fail); + return; + } avatar.setTag(userAvatar1); ImgLoader.display(this, userAvatar1, avatar); //txtChoose.setVisibility(View.GONE); @@ -230,6 +234,11 @@ public class CompleteUserInfoActivity extends AbsActivity { onSuccessToUrl(file, new OnItemClickListener() { @Override public void onItemClick(String bean, int position) { + if(StringUtil.isEmpty(bean)){ + ToastUtil.show(R.string.upload_fail); + loading.dismiss(); + return; + } avatar.setTag(bean); ImgLoader.display(mContext, bean, avatar); loading.dismiss(); 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 c70c8fc49..5d07dc0a2 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -93,6 +93,7 @@ import com.yunbao.common.manager.APKManager; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.NoviceInstructorManager; import com.yunbao.common.manager.OpenAdManager; +import com.yunbao.common.manager.imrongcloud.MessageIMManager; import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; @@ -235,6 +236,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene @Override public void run() { ConversationIMListManager.get(mContext).addUserInfoProvider(); + MessageIMManager.get(mContext).resetImUnReadMessageCount(mContext); } }, 1000); UserInfoManager.updateMyInfo(this, null); diff --git a/main/src/main/java/com/yunbao/main/adapter/MainMsgAddressBookListAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainMsgAddressBookListAdapter.java index 42fb4d7da..efae84832 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainMsgAddressBookListAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainMsgAddressBookListAdapter.java @@ -86,6 +86,12 @@ public class MainMsgAddressBookListAdapter extends BaseAdapter { + RouteUtil.forwardUserHome(mDataList.get(position).getId()); + }); + } holder.getConvertView().setTag(mDataList.get(position)); holder.getConvertView().setOnClickListener(view -> { AppManager.runDebugCode(new Runnable() { diff --git a/main/src/main/res/layout/activity_edit_user_hobby.xml b/main/src/main/res/layout/activity_edit_user_hobby.xml index 83e466a33..e915f5f6e 100644 --- a/main/src/main/res/layout/activity_edit_user_hobby.xml +++ b/main/src/main/res/layout/activity_edit_user_hobby.xml @@ -34,63 +34,53 @@ app:layout_constraintStart_toStartOf="@+id/titleView" app:layout_constraintTop_toBottomOf="@+id/titleView" /> - + + - - - - - - -