多人PK热度加成问题,主播,用户

This commit is contained in:
18401019693 2023-03-04 16:42:25 +08:00
parent 046adc9340
commit 0726c5dc1c
3 changed files with 11 additions and 3 deletions

View File

@ -52,7 +52,6 @@ import com.yunbao.common.bean.SlideInfoModel;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.dialog.EffectsSettingsDialog;
import com.yunbao.common.dialog.FloatSettingsDialog;
import com.yunbao.common.dialog.HintDialog;
import com.yunbao.common.dialog.LiveChargeDialogFragment;
import com.yunbao.common.dialog.SlideSettingsDialog;
import com.yunbao.common.dialog.YoursystemisolderDialog;
@ -1260,6 +1259,7 @@ public class LiveAudienceActivity extends LiveActivity {
case SOCKET_LIVE_DRPK_SET_PK_END_VIEW:
if (manager.getmLivePlayViewHolder() != null) {
manager.getmLivePlayViewHolder().setPkEndview();
manager.setPkStatus(false);
}
if (manager != null) {

View File

@ -1566,11 +1566,17 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
if (mLiveRyLinkMicPkPresenter != null) {
mLiveRyLinkMicPkPresenter.leaveDRRoom();
}
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.hotAddVisibility(false);
}
break;
case LEAVE_PK_SCORE:
if (mLiveRyLinkMicPkPresenter != null) {
mLiveRyLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime());
}
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.hotAddVisibility(true);
}
break;
case PK_TIME_COUNT:
if (mLiveRoomViewHolder != null) {

View File

@ -462,7 +462,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
}
private static boolean visibility =false;
private static boolean visibility = false;
public void hotAddVisibility(boolean visibility) {
this.visibility = visibility;
@ -472,6 +472,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public void endDRGif() {
if (dr_pk_end_gif.getVisibility() == View.GONE) {
dr_pk_end_gif.setVisibility(View.VISIBLE);
visibility = false;
RequestOptions options = new RequestOptions().skipMemoryCache(true);//配置
Glide.with(mContext).asGif()
.apply(options)//应用配置
@ -1220,6 +1221,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
*/
public void resetView() {
resetViewGone();
visibility = false;
mBannerList1.clear();
mBannerList2.clear();
mBannerList3.clear();
@ -3163,7 +3165,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
if ("1".equals(info[0])) {
if ("1".equals(info[0]) && !visibility) {
ft_hot_add.setVisibility(View.VISIBLE);
} else {
ft_hot_add.setVisibility(View.GONE);