From f30144c42c255681449bbb27475cf175a66b45ea Mon Sep 17 00:00:00 2001 From: ningwenqiang Date: Sat, 21 Sep 2024 14:35:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/common/fragment/ChatViewModel.java | 11 +---------- .../common/fragment/MainMessageChatFragment.java | 2 +- .../common/fragment/MainMessageChatListFragment.java | 9 +++++---- common/src/main/res/values-en-rUS/strings.xml | 2 +- common/src/main/res/values-zh/strings.xml | 2 +- common/src/main/res/values/strings.xml | 2 +- .../yunbao/live/activity/LiveSwAnchorActivity.java | 4 +--- .../com/yunbao/live/activity/ZhuangBanActivity.java | 9 +++++++-- .../com/yunbao/live/views/LiveRoomViewHolder.java | 6 ++++-- .../fragment/MainMessageChatListUserFragment.java | 2 +- 10 files changed, 23 insertions(+), 26 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/fragment/ChatViewModel.java b/common/src/main/java/com/yunbao/common/fragment/ChatViewModel.java index 66f0d4189..9f5f77e9d 100644 --- a/common/src/main/java/com/yunbao/common/fragment/ChatViewModel.java +++ b/common/src/main/java/com/yunbao/common/fragment/ChatViewModel.java @@ -22,16 +22,7 @@ public class ChatViewModel extends ViewModel { this.mChatFilter = mChatFilter; } -// public static final int FILTER_OFFLINE = 0; -// public static final int FILTER_ONLINE = 1; -// public static final int FILTER_UNREAD = 2; -// public static final int FILTER_READ = 4; -// public static final int FILTER_ALL = 7; -// All Chats -// Show Online -// Show Offline -// Show Read -// Show Unread + public int getTitleTextId() { int id = R.string.all_chats; diff --git a/common/src/main/java/com/yunbao/common/fragment/MainMessageChatFragment.java b/common/src/main/java/com/yunbao/common/fragment/MainMessageChatFragment.java index abc219736..8befd42ba 100644 --- a/common/src/main/java/com/yunbao/common/fragment/MainMessageChatFragment.java +++ b/common/src/main/java/com/yunbao/common/fragment/MainMessageChatFragment.java @@ -54,7 +54,7 @@ public class MainMessageChatFragment extends ConversationListFragment { mConversationListViewModel.getConversationListLiveData().observe(this.getViewLifecycleOwner(), new Observer>() { @Override public void onChanged(List uiConversations) { - int hashCode = UiConversationCodeUtil.getListHasCode(uiConversations); + int hashCode = uiConversations.hashCode(); if (listHashCode != hashCode) { Log.i("nwq", "刷新数据"); listHashCode = hashCode; 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 b85ed04ac..cd1bbbdf9 100644 --- a/common/src/main/java/com/yunbao/common/fragment/MainMessageChatListFragment.java +++ b/common/src/main/java/com/yunbao/common/fragment/MainMessageChatListFragment.java @@ -63,7 +63,7 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment @Override public void onResume() { super.onResume(); - chatViewModel = (new ViewModelProvider(requireActivity())).get(ChatViewModel.class); + chatViewModel = (new ViewModelProvider(requireActivity())).get(ChatViewModel.class); conversationListFragment = new MainMessageChatFragment(); setAdapter(conversationListFragment.getAdapter()); mAdapter.setFilter(chatViewModel.getChatFilter()); @@ -107,6 +107,7 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment uids.add(conversation.mCore.getTargetId()); } } + Log.i("更新的用户数据信息", "getUserInfo"); getUserInfo(uids); } }); @@ -130,9 +131,7 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment baseUiConversation.mCore.setPortraitUrl(datum.getAvatar()); String remark = InstructorRemarkManager.get(getContext()).getInstructorRemark().get(datum.getId()); baseUiConversation.mCore.setConversationTitle(StringUtil.isEmpty(remark) ? datum.getUserNiceName() : remark); - list.add(baseUiConversation); - UserInfo userInfo = new UserInfo(baseUiConversation.mCore.getTargetId(), baseUiConversation.mCore.getConversationTitle(), Uri.parse(baseUiConversation.mCore.getPortraitUrl())); @@ -153,7 +152,9 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment } mAdapter.setDataCollection(srcList); //mAdapter.onFinish(); - recyclerView.scrollToPosition(position); + if ( recyclerView!=null && mAdapter.getSrcList().size()>position){ + recyclerView.scrollToPosition(position); + } } onRefreshFinished(); onLoadMoreFinished(); diff --git a/common/src/main/res/values-en-rUS/strings.xml b/common/src/main/res/values-en-rUS/strings.xml index c8bfab6c0..2d2a8968e 100644 --- a/common/src/main/res/values-en-rUS/strings.xml +++ b/common/src/main/res/values-en-rUS/strings.xml @@ -1029,7 +1029,7 @@ Limited ride And limited avatar frame Click To View Anchor Task I have read and agreed to the - Please read and agree to the PDLIVE Host Agreement + Please read and agree to the PandoraLive Host Agreement PDLIVE Host Agreement The statute of limitations for new anchors expires coin diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 7e6382fe4..3eb9712aa 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1051,7 +1051,7 @@ 點擊查看 主播任務 我已閱讀並同意 - 請閱讀並同意《Pandora主播協議》 + 請閱讀並同意《PandoraLive主播協議》 《PDLIVE主播協議》 新秀主播時效截止至 收穫鑽石 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 21428e159..98e5f64f5 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -862,7 +862,7 @@ Limited ride And limited avatar frame Click To View Anchor Task I have read and agreed to the - Please read and agree to the PDLIVE Host Agreement + Please read and agree to the PandoraLive Host Agreement PDLIVE Host Agreement The statute of limitations for new anchors expires coin 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 af2f8288a..9ffffe5c7 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java @@ -834,9 +834,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl mLiveRoomViewHolder.setLiveInfo(mLiveUid, mStream, obj.getIntValue("userlist_time") * 1000); mLiveRoomViewHolder.setVotes(obj.getString("votestotal")); mLiveRoomViewHolder.setMedaRankNum(obj.getString("medalRankNum")); - String url = obj.getString("new_task_url")+"&uid="+mLiveUid+"&token="+CommonAppConfig.getInstance().getToken(); - Log.i("新手任务url",url); - mLiveRoomViewHolder.setShowTask(url,obj.getIntValue("is_new_live")==1); + mLiveRoomViewHolder.setShowTask(obj.getString("new_task_url"),obj.getIntValue("is_new_live")==1); mLiveRoomViewHolder.startFace(); UserBean u = CommonAppConfig.getInstance().getUserBean(); if (u != null) { diff --git a/live/src/main/java/com/yunbao/live/activity/ZhuangBanActivity.java b/live/src/main/java/com/yunbao/live/activity/ZhuangBanActivity.java index 1ce6a9acd..2e6183e2e 100644 --- a/live/src/main/java/com/yunbao/live/activity/ZhuangBanActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/ZhuangBanActivity.java @@ -298,10 +298,15 @@ public class ZhuangBanActivity extends AbsActivity { public static void forward(Context context, String url, boolean addArgs, int isLive) { if (addArgs) { - url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); + if(url.contains("?")){ + url += "&uid=" + CommonAppConfig.getInstance().getUid(); + }else { + url += "?uid=" + CommonAppConfig.getInstance().getUid(); + } + url += "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); } Intent intent = new Intent(context, ZhuangBanActivity.class); - Log.i("tag", url); + Log.i("ForwardUrl", url); intent.putExtra(Constants.URL, url); if (url.contains("Noble/index.html") || url.contains("RongYuQiang")) { intent.putExtra("title", ""); diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 38a7695c1..c74d86d05 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -3039,6 +3039,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis anchorTimeHandler.removeCallbacks(anchorTimeRunnable); pa_pao_layout.setVisibility(View.GONE); combo_layout.setVisibility(View.GONE); + mAnchorSay.setVisibility(View.GONE); + newGodSayGroup.setVisibility(View.GONE); + mLiveRoomHandler.removeMessages(LiveRoomHandler.WHAT_ANCHOR_GOD_SHOW_HIDE); resetViewGone(); visibility = false; pkUidTmp = ""; @@ -5592,13 +5595,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } public void setShowTask(String url, boolean isShow) { - newTaskGroup = findViewById(R.id.newTaskGroup); newTaskBg = findViewById(R.id.newTaskBg); newTaskBg.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - ZhuangBanActivity.forward(mContext, url, false, 1); + ZhuangBanActivity.forward(mContext, url, true, 1); } }); newTaskGroup.setVisibility(isShow ? View.VISIBLE : View.GONE); diff --git a/main/src/main/java/com/yunbao/main/fragment/MainMessageChatListUserFragment.java b/main/src/main/java/com/yunbao/main/fragment/MainMessageChatListUserFragment.java index cb992dbb2..a4bd9fe9b 100644 --- a/main/src/main/java/com/yunbao/main/fragment/MainMessageChatListUserFragment.java +++ b/main/src/main/java/com/yunbao/main/fragment/MainMessageChatListUserFragment.java @@ -252,7 +252,7 @@ public class MainMessageChatListUserFragment extends AbsMainMessageChatListFragm } mAdapter.setDataCollection(srcList); - mAdapter.onFinish(); + //mAdapter.onFinish(); recyclerView.scrollToPosition(position); } onRefreshFinished();