部分BUG修改

This commit is contained in:
ningwenqiang 2024-09-21 14:35:07 +08:00
parent 81cf2824a7
commit f30144c42c
10 changed files with 23 additions and 26 deletions

View File

@ -22,16 +22,7 @@ public class ChatViewModel extends ViewModel {
this.mChatFilter = mChatFilter; 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;
// <string name="all_chats">All Chats</string>
// <string name="online_only">Show Online </string>
// <string name="offline_only">Show Offline </string>
// <string name="read_only">Show Read </string>
// <string name="unread_only">Show Unread </string>
public int getTitleTextId() { public int getTitleTextId() {
int id = R.string.all_chats; int id = R.string.all_chats;

View File

@ -54,7 +54,7 @@ public class MainMessageChatFragment extends ConversationListFragment {
mConversationListViewModel.getConversationListLiveData().observe(this.getViewLifecycleOwner(), new Observer<List<BaseUiConversation>>() { mConversationListViewModel.getConversationListLiveData().observe(this.getViewLifecycleOwner(), new Observer<List<BaseUiConversation>>() {
@Override @Override
public void onChanged(List<BaseUiConversation> uiConversations) { public void onChanged(List<BaseUiConversation> uiConversations) {
int hashCode = UiConversationCodeUtil.getListHasCode(uiConversations); int hashCode = uiConversations.hashCode();
if (listHashCode != hashCode) { if (listHashCode != hashCode) {
Log.i("nwq", "刷新数据"); Log.i("nwq", "刷新数据");
listHashCode = hashCode; listHashCode = hashCode;

View File

@ -107,6 +107,7 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment
uids.add(conversation.mCore.getTargetId()); uids.add(conversation.mCore.getTargetId());
} }
} }
Log.i("更新的用户数据信息", "getUserInfo");
getUserInfo(uids); getUserInfo(uids);
} }
}); });
@ -130,9 +131,7 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment
baseUiConversation.mCore.setPortraitUrl(datum.getAvatar()); baseUiConversation.mCore.setPortraitUrl(datum.getAvatar());
String remark = InstructorRemarkManager.get(getContext()).getInstructorRemark().get(datum.getId()); String remark = InstructorRemarkManager.get(getContext()).getInstructorRemark().get(datum.getId());
baseUiConversation.mCore.setConversationTitle(StringUtil.isEmpty(remark) ? datum.getUserNiceName() : remark); baseUiConversation.mCore.setConversationTitle(StringUtil.isEmpty(remark) ? datum.getUserNiceName() : remark);
list.add(baseUiConversation); list.add(baseUiConversation);
UserInfo userInfo = new UserInfo(baseUiConversation.mCore.getTargetId(), UserInfo userInfo = new UserInfo(baseUiConversation.mCore.getTargetId(),
baseUiConversation.mCore.getConversationTitle(), baseUiConversation.mCore.getConversationTitle(),
Uri.parse(baseUiConversation.mCore.getPortraitUrl())); Uri.parse(baseUiConversation.mCore.getPortraitUrl()));
@ -153,8 +152,10 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment
} }
mAdapter.setDataCollection(srcList); mAdapter.setDataCollection(srcList);
//mAdapter.onFinish(); //mAdapter.onFinish();
if ( recyclerView!=null && mAdapter.getSrcList().size()>position){
recyclerView.scrollToPosition(position); recyclerView.scrollToPosition(position);
} }
}
onRefreshFinished(); onRefreshFinished();
onLoadMoreFinished(); onLoadMoreFinished();
} }

View File

@ -1029,7 +1029,7 @@ Limited ride And limited avatar frame</string>
<string name="click_to_view">Click To View</string> <string name="click_to_view">Click To View</string>
<string name="anchor_task">Anchor Task</string> <string name="anchor_task">Anchor Task</string>
<string name="anchor_agreement">I have read and agreed to the </string> <string name="anchor_agreement">I have read and agreed to the </string>
<string name="anchor_agreement_hint">Please read and agree to the PDLIVE Host Agreement</string> <string name="anchor_agreement_hint">Please read and agree to the PandoraLive Host Agreement</string>
<string name="anchor_hint">PDLIVE Host Agreement</string> <string name="anchor_hint">PDLIVE Host Agreement</string>
<string name="live_task_new_user_timer">The statute of limitations for new anchors expires</string> <string name="live_task_new_user_timer">The statute of limitations for new anchors expires</string>
<string name="live_data_coin">coin</string> <string name="live_data_coin">coin</string>

View File

@ -1051,7 +1051,7 @@
<string name="click_to_view">點擊查看</string> <string name="click_to_view">點擊查看</string>
<string name="anchor_task">主播任務</string> <string name="anchor_task">主播任務</string>
<string name="anchor_agreement">我已閱讀並同意</string> <string name="anchor_agreement">我已閱讀並同意</string>
<string name="anchor_agreement_hint">請閱讀並同意《Pandora主播協議》</string> <string name="anchor_agreement_hint">請閱讀並同意《PandoraLive主播協議》</string>
<string name="anchor_hint">《PDLIVE主播協議》</string> <string name="anchor_hint">《PDLIVE主播協議》</string>
<string name="live_task_new_user_timer">新秀主播時效截止至 </string> <string name="live_task_new_user_timer">新秀主播時效截止至 </string>
<string name="live_data_coin">收穫鑽石</string> <string name="live_data_coin">收穫鑽石</string>

View File

@ -862,7 +862,7 @@ Limited ride And limited avatar frame</string>
<string name="click_to_view">Click To View</string> <string name="click_to_view">Click To View</string>
<string name="anchor_task">Anchor Task</string> <string name="anchor_task">Anchor Task</string>
<string name="anchor_agreement">I have read and agreed to the </string> <string name="anchor_agreement">I have read and agreed to the </string>
<string name="anchor_agreement_hint">Please read and agree to the PDLIVE Host Agreement</string> <string name="anchor_agreement_hint">Please read and agree to the PandoraLive Host Agreement</string>
<string name="anchor_hint">PDLIVE Host Agreement</string> <string name="anchor_hint">PDLIVE Host Agreement</string>
<string name="live_task_new_user_timer">The statute of limitations for new anchors expires</string> <string name="live_task_new_user_timer">The statute of limitations for new anchors expires</string>
<string name="live_data_coin">coin</string> <string name="live_data_coin">coin</string>

View File

@ -834,9 +834,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
mLiveRoomViewHolder.setLiveInfo(mLiveUid, mStream, obj.getIntValue("userlist_time") * 1000); mLiveRoomViewHolder.setLiveInfo(mLiveUid, mStream, obj.getIntValue("userlist_time") * 1000);
mLiveRoomViewHolder.setVotes(obj.getString("votestotal")); mLiveRoomViewHolder.setVotes(obj.getString("votestotal"));
mLiveRoomViewHolder.setMedaRankNum(obj.getString("medalRankNum")); mLiveRoomViewHolder.setMedaRankNum(obj.getString("medalRankNum"));
String url = obj.getString("new_task_url")+"&uid="+mLiveUid+"&token="+CommonAppConfig.getInstance().getToken(); mLiveRoomViewHolder.setShowTask(obj.getString("new_task_url"),obj.getIntValue("is_new_live")==1);
Log.i("新手任务url",url);
mLiveRoomViewHolder.setShowTask(url,obj.getIntValue("is_new_live")==1);
mLiveRoomViewHolder.startFace(); mLiveRoomViewHolder.startFace();
UserBean u = CommonAppConfig.getInstance().getUserBean(); UserBean u = CommonAppConfig.getInstance().getUserBean();
if (u != null) { if (u != null) {

View File

@ -298,10 +298,15 @@ public class ZhuangBanActivity extends AbsActivity {
public static void forward(Context context, String url, boolean addArgs, int isLive) { public static void forward(Context context, String url, boolean addArgs, int isLive) {
if (addArgs) { 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); Intent intent = new Intent(context, ZhuangBanActivity.class);
Log.i("tag", url); Log.i("ForwardUrl", url);
intent.putExtra(Constants.URL, url); intent.putExtra(Constants.URL, url);
if (url.contains("Noble/index.html") || url.contains("RongYuQiang")) { if (url.contains("Noble/index.html") || url.contains("RongYuQiang")) {
intent.putExtra("title", ""); intent.putExtra("title", "");

View File

@ -3039,6 +3039,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
anchorTimeHandler.removeCallbacks(anchorTimeRunnable); anchorTimeHandler.removeCallbacks(anchorTimeRunnable);
pa_pao_layout.setVisibility(View.GONE); pa_pao_layout.setVisibility(View.GONE);
combo_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(); resetViewGone();
visibility = false; visibility = false;
pkUidTmp = ""; pkUidTmp = "";
@ -5592,13 +5595,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} }
public void setShowTask(String url, boolean isShow) { public void setShowTask(String url, boolean isShow) {
newTaskGroup = findViewById(R.id.newTaskGroup); newTaskGroup = findViewById(R.id.newTaskGroup);
newTaskBg = findViewById(R.id.newTaskBg); newTaskBg = findViewById(R.id.newTaskBg);
newTaskBg.setOnClickListener(new View.OnClickListener() { newTaskBg.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
ZhuangBanActivity.forward(mContext, url, false, 1); ZhuangBanActivity.forward(mContext, url, true, 1);
} }
}); });
newTaskGroup.setVisibility(isShow ? View.VISIBLE : View.GONE); newTaskGroup.setVisibility(isShow ? View.VISIBLE : View.GONE);

View File

@ -252,7 +252,7 @@ public class MainMessageChatListUserFragment extends AbsMainMessageChatListFragm
} }
mAdapter.setDataCollection(srcList); mAdapter.setDataCollection(srcList);
mAdapter.onFinish(); //mAdapter.onFinish();
recyclerView.scrollToPosition(position); recyclerView.scrollToPosition(position);
} }
onRefreshFinished(); onRefreshFinished();