diff --git a/Share/src/main/res/values-zh/strings.xml b/Share/src/main/res/values-zh/strings.xml index ec54569a2..ff510adfa 100644 --- a/Share/src/main/res/values-zh/strings.xml +++ b/Share/src/main/res/values-zh/strings.xml @@ -1,18 +1,19 @@ -ZWRrZnRUNlBlcHVxMXpsMzVmb2k6MTpjaQ -aq0eV4R1pqMK_AAeKRWnjPr7ErGMGgTPGgZJdm73WeRY-Kluws + ZWRrZnRUNlBlcHVxMXpsMzVmb2k6MTpjaQ + aq0eV4R1pqMK_AAeKRWnjPr7ErGMGgTPGgZJdm73WeRY-Kluws -分享 -快來 PDLIVE觀看%s直播,認識更多有趣的朋友吧! -Facebook -Line -Twitter -WhatsApp -Messenger -Instagram + 分享 + 站內好友 + 快來 PDLIVE觀看%s直播,認識更多有趣的朋友吧! + Facebook + Line + Twitter + WhatsApp + Messenger + Instagram -邀請好友 -快來 PDLIVE觀看直播,認識更多有趣的朋友吧! -複製 + 邀請好友 + 快來 PDLIVE觀看直播,認識更多有趣的朋友吧! + 複製 \ No newline at end of file diff --git a/Share/src/main/res/values/strings.xml b/Share/src/main/res/values/strings.xml index 7702b2fc7..8388037b0 100644 --- a/Share/src/main/res/values/strings.xml +++ b/Share/src/main/res/values/strings.xml @@ -1,24 +1,24 @@ + Share + Come and watch %s live on PDLIVE and meet more interesting people! + Invite Friends + Come to PDLIVE to discover more and better live streams. + Copy + Site friends + Share To + cancel + Search nickname + Send + Share success + Go chat + Please select friends - 分享 - 快來 PDLIVE觀看%s直播,認識更多有趣的朋友吧! - Facebook - Line - Twitter - WhatsApp - Messenger - Instagram - 站內好友 - - 邀請好友 - 快來 PDLIVE觀看直播,認識更多有趣的朋友吧! - 複製 - 分享至 - 搜索昵稱 - 發送 - 分享成功 - 去聊聊 - 请选择好友 + Facebook + Line + Twitter + WhatsApp + Messenger + Instagram \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 81d4288bb..29ed6c7b1 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -319,3 +319,17 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode; -keep class com.qiniu.**{*;} -keep class com.qiniu.**{public ();} -ignorewarnings + +#Adjust SDK +-keep class com.adjust.sdk.** { *; } +-keep class com.google.android.gms.common.ConnectionResult { + int SUCCESS; +} +-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient { + com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context); +} +-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info { + java.lang.String getId(); + boolean isLimitAdTrackingEnabled(); +} +-keep public class com.android.installreferrer.** { *; } diff --git a/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java b/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java index 91f9417cf..f965682f2 100644 --- a/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java @@ -19,6 +19,7 @@ import com.yunbao.common.interfaces.OnRecyclerListRefreshListener; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.message.content.MessageChatCardContent; import com.yunbao.common.utils.AppManager; +import com.yunbao.common.utils.ChatMsgTypeUtils; import com.yunbao.common.utils.DateFormatUtil; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ViewUtils; @@ -39,8 +40,11 @@ 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.HQVoiceMessage; +import io.rong.message.ImageMessage; import io.rong.message.SightMessage; import io.rong.message.TextMessage; +import io.rong.message.VoiceMessage; public class MainConversationListAdapter extends ConversationListAdapter { public static final int TYPE_SEARCH_TITLE = 500; @@ -134,6 +138,7 @@ public class MainConversationListAdapter extends ConversationListAdapter { Log.i("列表", "bindDefault: 用户名字:" + conversation.mCore.getConversationTitle()); ImgLoader.display(holder.getContext(), conversation.mCore.getPortraitUrl(), holder.getView(R.id.rc_conversation_portrait)); holder.setText(R.id.rc_conversation_title, conversation.mCore.getConversationTitle()); + ((TextView) holder.getView(R.id.rc_conversation_content)).setText(ChatMsgTypeUtils.getMsg(conversation.mConversationContent.toString())); if (conversation.mCore.getSentTime() != -1 && holder.getView(R.id.rc_conversation_date) != null) { holder.setText(R.id.rc_conversation_date, DateFormatUtil.getDateTimeString(conversation.mCore.getSentTime(), true, holder.getContext())); holder.getView(R.id.rc_conversation_date).setVisibility(View.VISIBLE); @@ -337,10 +342,15 @@ public class MainConversationListAdapter extends ConversationListAdapter { conversation.mCore.setUnreadMessageCount(integer); if(bean.getContent() instanceof SightMessage){ conversation.mConversationContent = new SpannableString(WordUtil.isNewZh()?"[小視頻]":"[Video]"); - }else{ + }else if(bean.getContent() instanceof HQVoiceMessage){ + conversation.mConversationContent = new SpannableString(WordUtil.isNewZh()?"[語音]":"[Voice]"); + } else if(bean.getContent() instanceof ImageMessage){ + conversation.mConversationContent = new SpannableString(WordUtil.isNewZh()?"[圖片]":"[picture]"); + }else if(bean.getContent() instanceof MessageChatCardContent){ + conversation.mConversationContent = new SpannableString(WordUtil.isNewZh()?"[站內分享]":"[In-app sharing]"); + } else{ conversation.mConversationContent = new SpannableString(((TextMessage) bean.getContent()).getContent()); } - mDataList.set(id, conversation); notifyItemChanged(id); } diff --git a/common/src/main/java/com/yunbao/common/dialog/GiftWallGiftInfoDialog.java b/common/src/main/java/com/yunbao/common/dialog/GiftWallGiftInfoDialog.java index 6b554682f..3ca287050 100644 --- a/common/src/main/java/com/yunbao/common/dialog/GiftWallGiftInfoDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/GiftWallGiftInfoDialog.java @@ -277,7 +277,7 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow { void initData() { adapter.setList_type(list_type); - if (isAnchor) { + if (isAnchor || (isTab2Enter && isStar)) { if (isStar) { gift_hall_type = 2; } else { diff --git a/common/src/main/java/com/yunbao/common/dialog/MessageChatNotifyDialog.java b/common/src/main/java/com/yunbao/common/dialog/MessageChatNotifyDialog.java index 7810da689..a9b2ab4dd 100644 --- a/common/src/main/java/com/yunbao/common/dialog/MessageChatNotifyDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/MessageChatNotifyDialog.java @@ -14,6 +14,7 @@ import com.yunbao.common.R; import com.yunbao.common.bean.MessageUserInfoBean; import com.yunbao.common.custom.RatioRoundImageView; import com.yunbao.common.glide.ImgLoader; +import com.yunbao.common.utils.ChatMsgTypeUtils; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.StringUtil; @@ -93,7 +94,7 @@ public class MessageChatNotifyDialog extends AbsDialogPositionPopupWindow { if (StringUtil.isEmpty(liveBean.getExtras())) { ((TextView) findViewById(R.id.description)).setText(liveBean.getUser().getSignature()); } else { - ((TextView) findViewById(R.id.description)).setText(liveBean.getExtras()); + ((TextView) findViewById(R.id.description)).setText(ChatMsgTypeUtils.getMsg(liveBean.getExtras())); } new Handler(Looper.getMainLooper()).postDelayed(() -> { dismiss(); diff --git a/common/src/main/java/com/yunbao/common/fragment/AbsMainMessageChatListFragment.java b/common/src/main/java/com/yunbao/common/fragment/AbsMainMessageChatListFragment.java index 41f81862a..a8478933d 100644 --- a/common/src/main/java/com/yunbao/common/fragment/AbsMainMessageChatListFragment.java +++ b/common/src/main/java/com/yunbao/common/fragment/AbsMainMessageChatListFragment.java @@ -2,6 +2,7 @@ package com.yunbao.common.fragment; import android.net.Uri; import android.os.Bundle; +import android.text.SpannableString; import android.util.Log; import android.view.View; @@ -23,6 +24,7 @@ import com.yunbao.common.interfaces.OnRecyclerListRefreshListener; import com.yunbao.common.adapter.MainConversationListAdapter; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.InstructorRemarkManager; +import com.yunbao.common.utils.ChatMsgTypeUtils; import com.yunbao.common.utils.StringUtil; import org.greenrobot.eventbus.EventBus; @@ -158,7 +160,7 @@ public abstract class AbsMainMessageChatListFragment extends Fragment { break; } } - + srcList.get(i).mConversationContent =new SpannableString(ChatMsgTypeUtils.getMsg(srcList.get(i).mConversationContent.toString())); } onRefreshListener.onFinish(srcList); isNet = false; diff --git a/common/src/main/java/com/yunbao/common/fragment/MainMessageChatListFragment.java b/common/src/main/java/com/yunbao/common/fragment/MainMessageChatListFragment.java index 064807c63..e479828d2 100644 --- a/common/src/main/java/com/yunbao/common/fragment/MainMessageChatListFragment.java +++ b/common/src/main/java/com/yunbao/common/fragment/MainMessageChatListFragment.java @@ -3,6 +3,7 @@ package com.yunbao.common.fragment; import android.content.Context; import android.net.Uri; import android.os.Bundle; +import android.text.SpannableString; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -23,6 +24,7 @@ import com.yunbao.common.interfaces.OnRecyclerListRefreshListener; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.InstructorRemarkManager; import com.yunbao.common.utils.Bus; +import com.yunbao.common.utils.ChatMsgTypeUtils; import com.yunbao.common.utils.L; import com.yunbao.common.utils.StringUtil; @@ -39,6 +41,7 @@ import io.rong.imkit.widget.refresh.listener.OnRefreshListener; import io.rong.imlib.model.Conversation; import io.rong.imlib.model.Message; import io.rong.imlib.model.UserInfo; +import io.rong.message.VoiceMessage; public class MainMessageChatListFragment extends AbsMainMessageChatListFragment { private static final String TAG = "MainMessageChatListFragment"; @@ -72,6 +75,9 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment @Override public void onFinish(List baseUiConversations) { InstructorRemarkManager.get(mContext).getNetInstructorRemark(); + for (int i = 0; i >() { @Override public void onFinish(Map stringIntegerMap) { diff --git a/common/src/main/java/com/yunbao/common/utils/ChatMsgTypeUtils.java b/common/src/main/java/com/yunbao/common/utils/ChatMsgTypeUtils.java new file mode 100644 index 000000000..6492a1f54 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/utils/ChatMsgTypeUtils.java @@ -0,0 +1,22 @@ +package com.yunbao.common.utils; + +/** + * 消息类型翻译管理器 + */ +public class ChatMsgTypeUtils { + public static String getMsg(String msg) { + String rsult = msg; + switch (msg) { + case "[小视频]": + rsult = WordUtil.isNewZh() ? "[小視頻]" : "[Video]"; + break; + case "[语音]": + rsult = WordUtil.isNewZh() ? "[語音]" : "[Voice]"; + break; + case "[图片]": + rsult = WordUtil.isNewZh() ? "[圖片]" : "[Image]"; + break; + } + return rsult; + } +} diff --git a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java index 8de0bf184..d98283368 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java @@ -1899,6 +1899,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl .setIcon("https://downs.yaoulive.com/xzs_tab.png") .setNameColor("#f19ec2") .setSystemBubble("https://downs.yaoulive.com/xzs_qipao.9.png") + .setIconEn("https://downs.yaoulive.com/Robot_en.png") .setUserName("") .setContent(content); SocketSendBean msg = diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java index 12733abfb..18642bc1d 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java @@ -836,7 +836,11 @@ public class LiveGiftPopup extends AbsDialogFragment { @Override public void onSuccess(GiftNamingInfoModel data) { if (TextUtils.equals(data.getNamingStatus(), "1")) { + boolean isPageGift = liveGiftModel.isPageGift(); liveGiftModel = JSONObject.parseObject(GsonUtils.toJson(data), LiveGiftBean.class); + liveGiftModel.setPageGift(isPageGift); + liveGiftModel.setGift_id(giftId); + liveGiftModel.setId(giftId); if (!TextUtils.isEmpty(liveGiftModel.getNamingLiveuid()) && !TextUtils.isEmpty(liveGiftModel.getNamingUid()) && !TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") && diff --git a/live/src/main/res/layout/dialog_live_data.xml b/live/src/main/res/layout/dialog_live_data.xml index abe00775c..32b2fd304 100644 --- a/live/src/main/res/layout/dialog_live_data.xml +++ b/live/src/main/res/layout/dialog_live_data.xml @@ -36,9 +36,9 @@ android:textSize="16sp" /> @@ -52,7 +52,9 @@ diff --git a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java index fe8482ff1..e4776463c 100644 --- a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java @@ -46,6 +46,7 @@ import com.yunbao.common.bean.ActiveBean; import com.yunbao.common.bean.ActiveOtherBean; import com.yunbao.common.bean.HomeUserExhibitInfoBean; import com.yunbao.common.bean.HomeUserInfoBean; +import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.LabelBean; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.NewLevelModel; @@ -59,6 +60,7 @@ import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.interfaces.CommonCallback; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.NewLevelManager; import com.yunbao.common.upload.UploadBean; import com.yunbao.common.upload.UploadCallback; @@ -803,7 +805,7 @@ public class UserHomeActivity extends AbsActivity { @Override public void onClick(View v) { Constants.myIntoIndex = 2; - String url = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/RongYuQiang??touid=" + uid; + String url = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ/RongYuQiang?touid=" + uid+"&isZh="+(WordUtil.isNewZh() ? "1" : "0"); WebViewActivity.forward(mContext, url, false); } }); diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java index 81304ff53..1fe92a305 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java @@ -470,8 +470,11 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement } else if ("home_page_banner_battle".equals(link)) { RouteUtil.forwardBattlePass(); } else if ("home_page_banner_giftwall".equals(link)) { + if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing()) { + mShowLoadingDialog.dismiss(); + } new GiftWallDialog(mContext, IMLoginManager.get(mContext).getUserInfo().getId() + "", - IMLoginManager.get(mContext).getUserInfo().getUserNicename(),null + IMLoginManager.get(mContext).getUserInfo().getUserNicename(), null , false).setFullWindows(true).setTab2(true).showDialog(); } else { gotoLive(link);