Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2b62d018b5
@ -1,12 +1,10 @@
|
|||||||
package com.yunbao.live.views;
|
package com.yunbao.live.views;
|
||||||
|
|
||||||
import static com.yunbao.live.bean.LiveChatBean.RECOMMEND_CARD_NOTIFY;
|
import static com.yunbao.live.bean.LiveChatBean.RECOMMEND_CARD_NOTIFY;
|
||||||
import static com.yunbao.live.views.LivePushRyViewHolder.btn_close;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
|
||||||
import android.graphics.Outline;
|
import android.graphics.Outline;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -4234,7 +4232,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void wishListProgress(WishModel wishModel, String userNiceName,int level) {
|
public void wishListProgress(WishModel wishModel, String userNiceName, int level) {
|
||||||
wishListProgress = null;
|
wishListProgress = null;
|
||||||
WishModel model = wishModel;
|
WishModel model = wishModel;
|
||||||
if (!TextUtils.isEmpty(model.getWishlistName()) || !TextUtils.isEmpty(model.getWishlistProgress())) {
|
if (!TextUtils.isEmpty(model.getWishlistName()) || !TextUtils.isEmpty(model.getWishlistProgress())) {
|
||||||
@ -4243,7 +4241,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
mTopBannerList.remove(bannerBean);
|
mTopBannerList.remove(bannerBean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
topBanner1.update(mTopBannerList);
|
if (mTopBannerList.size()==0){
|
||||||
|
topBanner1.setVisibility(View.GONE);
|
||||||
|
}else {
|
||||||
|
topBanner1.update(mTopBannerList);
|
||||||
|
}
|
||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -4263,7 +4265,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
bean.setType(LiveChatBean.WISH_LIST_PROGRESS);
|
bean.setType(LiveChatBean.WISH_LIST_PROGRESS);
|
||||||
bean.setLevel(level);
|
bean.setLevel(level);
|
||||||
mLiveChatAdapter.insertItem(bean);
|
mLiveChatAdapter.insertItem(bean);
|
||||||
topBanner1.update(mTopBannerList);
|
if (mTopBannerList.size()==0){
|
||||||
|
topBanner1.setVisibility(View.GONE);
|
||||||
|
}else {
|
||||||
|
topBanner1.update(mTopBannerList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
@ -4279,7 +4285,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
// bean.setAtUserName(model.getWishlistName());
|
// bean.setAtUserName(model.getWishlistName());
|
||||||
// bean.setType(LiveChatBean.WISH_LIST_PROGRESS);
|
// bean.setType(LiveChatBean.WISH_LIST_PROGRESS);
|
||||||
// mLiveChatAdapter.insertItem(bean);
|
// mLiveChatAdapter.insertItem(bean);
|
||||||
topBanner1.update(mTopBannerList);
|
if (mTopBannerList.size()==0){
|
||||||
|
topBanner1.setVisibility(View.GONE);
|
||||||
|
}else {
|
||||||
|
topBanner1.update(mTopBannerList);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4559,8 +4570,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
enterRoomLeave.setBackgroundResource(R.drawable.background_100);
|
enterRoomLeave.setBackgroundResource(R.drawable.background_100);
|
||||||
enterRoomLeave2.setBackgroundResource(R.drawable.bg_100_leave);
|
enterRoomLeave2.setBackgroundResource(R.drawable.bg_100_leave);
|
||||||
}
|
}
|
||||||
|
boolean max = level > 99;
|
||||||
new LiveTextRender().getLiveLevelImage(mContext, model.getLevel(), true,new ImgLoader.DrawableCallback() {
|
new LiveTextRender().getLiveLevelImage(mContext, model.getLevel(), max, new ImgLoader.DrawableCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onLoadSuccess(Drawable drawable) {
|
public void onLoadSuccess(Drawable drawable) {
|
||||||
ImgLoader.display2(mContext, drawable, imageView);
|
ImgLoader.display2(mContext, drawable, imageView);
|
||||||
@ -4751,49 +4762,52 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
.setOnBannerClickListener(new OnBannerClickListener() {
|
.setOnBannerClickListener(new OnBannerClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onBannerClick(List datas, int position) {
|
public void onBannerClick(List datas, int position) {
|
||||||
if (mTopBannerList.get(position).getType() == TopBannerCustomViewHolder.TYPE_CALL_ANCHOR) {
|
if (datas.size()>0){
|
||||||
Dialog loading = DialogUitl.loadingDialog(mContext);
|
if (mTopBannerList.get(position).getType() == TopBannerCustomViewHolder.TYPE_CALL_ANCHOR) {
|
||||||
loading.show();
|
Dialog loading = DialogUitl.loadingDialog(mContext);
|
||||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
loading.show();
|
||||||
fragment.setOnDismissListener(dialog -> {
|
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||||
checkNewLetter();
|
fragment.setOnDismissListener(dialog -> {
|
||||||
}
|
checkNewLetter();
|
||||||
);
|
}
|
||||||
fragment.setOnShowListener(dialog -> mHandler.postDelayed(loading::dismiss, 500));
|
);
|
||||||
Bundle bundle = new Bundle();
|
fragment.setOnShowListener(dialog -> mHandler.postDelayed(loading::dismiss, 500));
|
||||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
|
||||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
|
||||||
bundle.putString(Constants.LIVE_WISH_GIFTID, mTopBannerList.get(position).getActivityId() + "");
|
|
||||||
bundle.putBoolean("isContactGift", true);
|
|
||||||
fragment.setArguments(bundle);
|
|
||||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
|
||||||
} else {
|
|
||||||
BannerBean bean = mTopBannerList.get(position);
|
|
||||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
|
||||||
String type = "";
|
|
||||||
StringBuffer htmlUrl = new StringBuffer();
|
|
||||||
htmlUrl.append(bean.getLink())
|
|
||||||
.append(bean.getLink().contains("?") ? "&uid=" : "?uid=")
|
|
||||||
.append(userInfo.getId())
|
|
||||||
.append("&token=")
|
|
||||||
.append(userInfo.getToken())
|
|
||||||
.append("&anchorUid=")
|
|
||||||
.append(mLiveUid)
|
|
||||||
.append("&liveUid=")
|
|
||||||
.append(mLiveUid)
|
|
||||||
.append("&t=")
|
|
||||||
.append(System.currentTimeMillis())
|
|
||||||
.append("&g=Appapi&m=Wish&a=index");
|
|
||||||
if (TextUtils.equals(type, "1")) {
|
|
||||||
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false);
|
|
||||||
} else {
|
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("url", htmlUrl.toString());
|
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||||
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
|
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||||
|
bundle.putString(Constants.LIVE_WISH_GIFTID, mTopBannerList.get(position).getActivityId() + "");
|
||||||
|
bundle.putBoolean("isContactGift", true);
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||||
|
} else {
|
||||||
|
BannerBean bean = mTopBannerList.get(position);
|
||||||
|
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||||
|
String type = "";
|
||||||
|
StringBuffer htmlUrl = new StringBuffer();
|
||||||
|
htmlUrl.append(bean.getLink())
|
||||||
|
.append(bean.getLink().contains("?") ? "&uid=" : "?uid=")
|
||||||
|
.append(userInfo.getId())
|
||||||
|
.append("&token=")
|
||||||
|
.append(userInfo.getToken())
|
||||||
|
.append("&anchorUid=")
|
||||||
|
.append(mLiveUid)
|
||||||
|
.append("&liveUid=")
|
||||||
|
.append(mLiveUid)
|
||||||
|
.append("&t=")
|
||||||
|
.append(System.currentTimeMillis())
|
||||||
|
.append("&g=Appapi&m=Wish&a=index");
|
||||||
|
if (TextUtils.equals(type, "1")) {
|
||||||
|
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false);
|
||||||
|
} else {
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("url", htmlUrl.toString());
|
||||||
|
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.start();
|
.start();
|
||||||
|
Loading…
Reference in New Issue
Block a user