代码优化
This commit is contained in:
parent
bee903d22a
commit
983bb2837a
@ -834,7 +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"));
|
||||
mLiveRoomViewHolder.setShowTask(obj.getString("new_task_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) {
|
||||
|
@ -800,11 +800,15 @@ public class SocketSwClient {
|
||||
.setObject(WordUtil.isNewZh() ? item.getString("text") : item.getString("text_en")));
|
||||
case Constants.SOCKET_SEND_NEW_TASK_PUSH:
|
||||
item = map.getJSONObject("ct");
|
||||
if(CommonAppConfig.getInstance().getUid().equals(item.getString("uid"))){
|
||||
Bus.get().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.LIVE_AUTHOR_NEW_TASK_PUSH).setUid(item.getString("uid")).setHrefUrl(item.getString("href")));
|
||||
}
|
||||
break;
|
||||
case Constants.SOCKET_SEND_NEW_TASK_IM:
|
||||
item = map.getJSONObject("ct");
|
||||
if(CommonAppConfig.getInstance().getUid().equals(item.getString("uid"))){
|
||||
Bus.get().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.LIVE_AUTHOR_GIFT_PUSH).setUid(item.getString("uid")).setHrefUrl(item.getString("href")));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -377,6 +377,9 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
||||
}
|
||||
if(anchor_level!=null){
|
||||
long levelExp = Long.parseLong(next_level_exp);
|
||||
if(Integer.parseInt(level_up)==0){
|
||||
levelExp = 0;
|
||||
}
|
||||
String tips = mContext.getResources().getString(R.string.live_user_level_anchor)
|
||||
+"Lv."+level+" | "+(WordUtil.isNewZh()?"差 "+levelExp+" 經驗升級":levelExp+" experience points to level up");
|
||||
anchor_level.setText(tips);
|
||||
@ -411,10 +414,15 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
||||
@Override
|
||||
public void run() {
|
||||
if(level_up!=null&&votestotal!=null){
|
||||
if(Integer.parseInt(level_up)==0){
|
||||
level_progress.setMax(1);
|
||||
level_progress.setProgress(1);
|
||||
}else{
|
||||
level_progress.setMax(Integer.parseInt(level_up));
|
||||
level_progress.setProgress(Integer.parseInt(votestotal));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1218,7 +1218,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
public void showH5Dialog() {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", CommonAppConfig.HOST + "/h5/activity/pdlNewUes/index.html?uid="+CommonAppConfig.getInstance().getUid()+"&token="+CommonAppConfig.getInstance().getToken());
|
||||
bundle.putString("url", CommonAppConfig.HOST + "/h5/activity/pdlNewUes/index.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken());
|
||||
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||
@ -3125,7 +3125,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
});*/
|
||||
}
|
||||
|
||||
public void showLiveRoomActivityBanner() {
|
||||
public void showLiveRoomActivityBanner(boolean isNewPersonAn) {
|
||||
LiveNetManager.get(mContext).getLiveRoomActivityBanner(new com.yunbao.common.http.base.HttpCallback<List<LiveRoomActivityBanner>>() {
|
||||
@Override
|
||||
public void onSuccess(List<LiveRoomActivityBanner> data) {
|
||||
@ -3142,6 +3142,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
bean.setShow_type(datum.getType());
|
||||
mBannerList4.add(bean);
|
||||
}
|
||||
if (isNewPersonAn) {
|
||||
BannerBean bean = new BannerBean();
|
||||
bean.setActivityId(511);
|
||||
mBannerList4.add(bean);
|
||||
}
|
||||
showBanner4();
|
||||
}
|
||||
|
||||
@ -5017,7 +5022,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
*/
|
||||
public void firstLook5MinLiveNotify() {
|
||||
if (mLiveRoomHandler != null) {
|
||||
mLiveRoomHandler.sendEmptyMessageAtTime(LiveRoomHandler.WHAT_LOOK_5_MIN_LIVE, getNextTime(1000 *60* 5));
|
||||
mLiveRoomHandler.sendEmptyMessageAtTime(LiveRoomHandler.WHAT_LOOK_5_MIN_LIVE, getNextTime(1000 * 60 * 5));
|
||||
}
|
||||
}
|
||||
|
||||
@ -5046,6 +5051,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
*/
|
||||
public void setNewPersonTask() {
|
||||
newPersonTask.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
|
||||
private long getNextTime(int time) {
|
||||
@ -5530,6 +5536,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
@Override
|
||||
public void onBannerClick(List datas, int p) {
|
||||
if (mBannerList4.get(p).getActivityId() == 511) {
|
||||
showH5Dialog();
|
||||
} else {
|
||||
if (mBannerList4.get(p).getLink().equals("BattlePass") || mBannerList4.get(p).getType() == 888) {
|
||||
RouteUtil.forwardBattlePass();
|
||||
return;
|
||||
@ -5556,6 +5565,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void openWebDialog(String url) {
|
||||
|
@ -2328,19 +2328,15 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
public void setNewTaskPush(String uid,String url) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
if(CommonAppConfig.getInstance().getUid().equals(uid)){
|
||||
mLiveRoomViewHolder.showTaskDetailsNotify1(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setNewTaskIM(String uid) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
if(CommonAppConfig.getInstance().getUid().equals(uid)){
|
||||
mLiveRoomViewHolder.showSendGiftTaskIMMsg();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 全服喇叭
|
||||
|
Loading…
Reference in New Issue
Block a user