Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6f6cfc8f80
@ -1272,7 +1272,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
|||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
List<GuardUserBean> list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class);
|
List<GuardUserBean> list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class);
|
||||||
if(list.isEmpty()){
|
if(list.isEmpty()){
|
||||||
openNewBuyGuardWindow();
|
openNewBuyGuardWindow(true);
|
||||||
}else {
|
}else {
|
||||||
LiveNewGuardListDialogFragment fragment = new LiveNewGuardListDialogFragment();
|
LiveNewGuardListDialogFragment fragment = new LiveNewGuardListDialogFragment();
|
||||||
fragment.setList(list);
|
fragment.setList(list);
|
||||||
@ -1340,7 +1340,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
|||||||
/**
|
/**
|
||||||
* 打开购买新版守护的弹窗
|
* 打开购买新版守护的弹窗
|
||||||
*/
|
*/
|
||||||
public void openNewBuyGuardWindow() {
|
public void openNewBuyGuardWindow(boolean isEmpty) {
|
||||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || mLiveGuardInfo == null) {
|
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || mLiveGuardInfo == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1353,6 +1353,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
|||||||
bundle.putString(Constants.STREAM, mStream);
|
bundle.putString(Constants.STREAM, mStream);
|
||||||
bundle.putString(Constants.LIVE_ANCHER_ICON, mAncherIcon);
|
bundle.putString(Constants.LIVE_ANCHER_ICON, mAncherIcon);
|
||||||
bundle.putString(Constants.USER_ICON, CommonAppConfig.getInstance().getUserBean().getAvatar());
|
bundle.putString(Constants.USER_ICON, CommonAppConfig.getInstance().getUserBean().getAvatar());
|
||||||
|
bundle.putBoolean("guard",isEmpty);
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
fragment.show(getSupportFragmentManager(), "LiveGuardBuyDialogFragment");
|
fragment.show(getSupportFragmentManager(), "LiveGuardBuyDialogFragment");
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ public class LiveGuardDialogFragment extends AbsDialogFragment implements View.O
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
dismiss();
|
dismiss();
|
||||||
((LiveActivity) mContext).openNewBuyGuardWindow();
|
((LiveActivity) mContext).openNewBuyGuardWindow(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -80,6 +80,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
|
|
||||||
private LiveNewGuardBuyItemsAdapter buyItemsAdapter;
|
private LiveNewGuardBuyItemsAdapter buyItemsAdapter;
|
||||||
private GuardRightAdapter mGuardRightAdapter;
|
private GuardRightAdapter mGuardRightAdapter;
|
||||||
|
private boolean isEmpty;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -132,7 +133,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
buy2 = mRootView.findViewById(R.id.buy2);
|
buy2 = mRootView.findViewById(R.id.buy2);
|
||||||
guard_tips = mRootView.findViewById(R.id.guard_textView2);
|
guard_tips = mRootView.findViewById(R.id.guard_textView2);
|
||||||
|
|
||||||
iconCover.setImageResource(R.drawable.guardian_img_wings);
|
//iconCover.setImageResource(R.drawable.guardian_img_wings);
|
||||||
|
|
||||||
mBtnBuy.setOnClickListener(this);
|
mBtnBuy.setOnClickListener(this);
|
||||||
submit.setOnClickListener(this);
|
submit.setOnClickListener(this);
|
||||||
@ -163,6 +164,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
mUserIcon = bundle.getString(Constants.USER_ICON);
|
mUserIcon = bundle.getString(Constants.USER_ICON);
|
||||||
String coinName = WordUtil.getString(R.string.diamond);
|
String coinName = WordUtil.getString(R.string.diamond);
|
||||||
mCoinName = coinName;
|
mCoinName = coinName;
|
||||||
|
isEmpty=bundle.getBoolean("guard",true);
|
||||||
// mCoinNameTextView.setText(WordUtil.getString(R.string.guard_my) + coinName + ":");
|
// mCoinNameTextView.setText(WordUtil.getString(R.string.guard_my) + coinName + ":");
|
||||||
mCoinNameTextView.setText("快为您喜欢的主播开通守护吧");
|
mCoinNameTextView.setText("快为您喜欢的主播开通守护吧");
|
||||||
anchorName.setText(String.format("成爲%s的守護", mAncherName));
|
anchorName.setText(String.format("成爲%s的守護", mAncherName));
|
||||||
@ -201,7 +203,20 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
private void initView() {
|
private void initView() {
|
||||||
int guardType = mLiveGuardInfo.getMyGuardType();
|
int guardType = mLiveGuardInfo.getMyGuardType();
|
||||||
if (guardType == Constants.GUARD_TYPE_NONE) {
|
if (guardType == Constants.GUARD_TYPE_NONE) {
|
||||||
iconCover.setBackgroundResource(R.drawable.guardian_img_wings);
|
if(isEmpty){
|
||||||
|
iconCover.setImageResource(R.drawable.guardian_img_wings);
|
||||||
|
userIconOne.setVisibility(View.GONE);
|
||||||
|
userIconTwo.setVisibility(View.GONE);
|
||||||
|
}else{
|
||||||
|
ImgLoader.display(mContext, mAncherIcon, userIconOne);
|
||||||
|
ImgLoader.display(mContext, mUserIcon, userIconTwo);
|
||||||
|
userIconOne.setVisibility(View.VISIBLE);
|
||||||
|
userIconTwo.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
}
|
||||||
|
// iconCover.setBackgroundResource(R.drawable.guardian_img_wings);
|
||||||
|
|
||||||
|
|
||||||
buy1.setVisibility(View.VISIBLE);
|
buy1.setVisibility(View.VISIBLE);
|
||||||
buy2.setVisibility(View.GONE);
|
buy2.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
|
@ -168,7 +168,7 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
dismiss();
|
dismiss();
|
||||||
((LiveActivity) mContext).openNewBuyGuardWindow();
|
((LiveActivity) mContext).openNewBuyGuardWindow(list.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -932,6 +932,7 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void release() {
|
public void release() {
|
||||||
|
EventBus.getDefault().unregister(this);
|
||||||
LiveHttpUtil.cancel(LiveHttpConsts.GET_TX_LINK_MIC_ACC_URL);
|
LiveHttpUtil.cancel(LiveHttpConsts.GET_TX_LINK_MIC_ACC_URL);
|
||||||
LiveHttpUtil.cancel(LiveHttpConsts.GET_LINK_MIC_STREAM);
|
LiveHttpUtil.cancel(LiveHttpConsts.GET_LINK_MIC_STREAM);
|
||||||
LiveHttpUtil.cancel(LiveHttpConsts.LINK_MIC_SHOW_VIDEO);
|
LiveHttpUtil.cancel(LiveHttpConsts.LINK_MIC_SHOW_VIDEO);
|
||||||
|
@ -178,7 +178,6 @@ public class SocketRyClient {
|
|||||||
}
|
}
|
||||||
UserBean us = CommonAppConfig.getInstance().getUserBean();
|
UserBean us = CommonAppConfig.getInstance().getUserBean();
|
||||||
if (map.getString("uid") != null && map.getString("uid").equals(us.getId())) {
|
if (map.getString("uid") != null && map.getString("uid").equals(us.getId())) {
|
||||||
LiveAudienceActivity.is_fans = "1";
|
|
||||||
int num = LiveAudienceActivity.fansNum + 1;
|
int num = LiveAudienceActivity.fansNum + 1;
|
||||||
LiveRoomViewHolder.setFansNum(num);
|
LiveRoomViewHolder.setFansNum(num);
|
||||||
}
|
}
|
||||||
|
@ -651,6 +651,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
|||||||
public void release() {
|
public void release() {
|
||||||
super.release();
|
super.release();
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
|
removeCallbacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1416,6 +1416,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
mViewMedal.setVisibility(View.GONE);
|
mViewMedal.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
if (mBtnFollow.getVisibility() == View.VISIBLE) {
|
if (mBtnFollow.getVisibility() == View.VISIBLE) {
|
||||||
|
LiveAudienceActivity.is_fans = "2";
|
||||||
mBtnFollow.setVisibility(View.GONE);
|
mBtnFollow.setVisibility(View.GONE);
|
||||||
mViewMedal.setVisibility(View.VISIBLE);
|
mViewMedal.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user