修改信件未读消息请求方式

This commit is contained in:
18401019693 2024-01-05 13:29:01 +08:00
parent aad607ace8
commit 3445ee2a56

View File

@ -1823,7 +1823,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* 重置数据 * 重置数据
*/ */
public void resetView() { public void resetView() {
contactMsgPage = -1;
svgaImageViewHashMap.clear(); svgaImageViewHashMap.clear();
pa_pao_layout.removeAllViews(); pa_pao_layout.removeAllViews();
timeHandler.removeCallbacks(timeRunnable); timeHandler.removeCallbacks(timeRunnable);
@ -4103,7 +4102,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} }
public void clearData() { public void clearData() {
contactMsgPage = -1;
svgaImageViewHashMap.clear(); svgaImageViewHashMap.clear();
pa_pao_layout.removeAllViews(); pa_pao_layout.removeAllViews();
timeHandler.removeCallbacks(timeRunnable); timeHandler.removeCallbacks(timeRunnable);
@ -5504,7 +5502,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} }
public void initTopBanner() { public void initTopBanner() {
contactMsgPage = 1;
checkNewLetter(); checkNewLetter();
if (mTopBannerList == null) { if (mTopBannerList == null) {
mTopBannerList = new ArrayList<>(); mTopBannerList = new ArrayList<>();
@ -5706,11 +5703,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}); });
} }
private int contactMsgPage = 1;
private synchronized void checkNewLetter() { private synchronized void checkNewLetter() {
if (contactMsgPage > 0) {
LiveNetManager.get(mContext).getContactMsg(contactMsgPage, new com.yunbao.common.http.base.HttpCallback<List<LiveUserMailBoxModel>>() { LiveNetManager.get(mContext).getContactMsg(1, new com.yunbao.common.http.base.HttpCallback<List<LiveUserMailBoxModel>>() {
@Override @Override
public void onSuccess(List<LiveUserMailBoxModel> data) { public void onSuccess(List<LiveUserMailBoxModel> data) {
if (data.size() > 0 && data != null) { if (data.size() > 0 && data != null) {
@ -5720,11 +5716,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
return; return;
} }
} }
contactMsgPage = contactMsgPage + 1;
checkNewLetter();
} else { } else {
((LiveAudienceActivity) mContext).showMsgRed(-1); ((LiveAudienceActivity) mContext).showMsgRed(-1);
contactMsgPage = 1;
} }
@ -5732,10 +5725,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
@Override @Override
public void onError(String error) { public void onError(String error) {
contactMsgPage = 1;
} }
}); });
}
} }