防抖,主播私聊修复
This commit is contained in:
parent
892aaab6c0
commit
a453a526fa
@ -9,9 +9,9 @@ ext {
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式
|
||||
// serverHost : "https://napi.yaoulive.com",
|
||||
serverHost : "https://napi.yaoulive.com",
|
||||
//測試
|
||||
serverHost : "https://ceshi.yaoulive.com",
|
||||
// serverHost : "https://ceshi.yaoulive.com",
|
||||
|
||||
//腾讯地图
|
||||
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
||||
|
@ -76,6 +76,7 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.AbsMainViewHolder;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.bean.LiveBean;
|
||||
import com.yunbao.live.http.LiveHttpConsts;
|
||||
@ -557,6 +558,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
// });
|
||||
|
||||
public void mainClick(View v) {
|
||||
ViewClicksAntiShake.clicksAntiShake(v, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (!canClick()) {
|
||||
return;
|
||||
}
|
||||
@ -569,9 +573,12 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
//关注
|
||||
FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUid(), 0);
|
||||
} else if (i == R.id.img_trophy) {
|
||||
MainListActivity.forward(this, 0);
|
||||
MainListActivity.forward(mContext, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void showStartDialog() {
|
||||
if (isReady == true) {
|
||||
|
@ -2,8 +2,6 @@ package com.yunbao.main.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@ -11,6 +9,9 @@ import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
@ -23,6 +24,7 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.bean.ListBean;
|
||||
|
||||
@ -58,20 +60,24 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
||||
mCoinName = type == TYPE_PROFIT ? appConfig.getVotesName() : appConfig.getCoinName();
|
||||
mTopList = new ArrayList<>();
|
||||
mFollow = ("+"+WordUtil.getString(R.string.follow));
|
||||
mFollow = ("+" + WordUtil.getString(R.string.follow));
|
||||
mFollowing = WordUtil.getString(R.string.following);
|
||||
mItemClickListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ViewClicksAntiShake.clicksAntiShake(v, () -> {
|
||||
Object tag = v.getTag();
|
||||
if (tag != null && mOnItemClickListener != null) {
|
||||
mOnItemClickListener.onItemClick((ListBean) tag, 0);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
mFollowClickListener1 = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ViewClicksAntiShake.clicksAntiShake(v, () -> {
|
||||
if (!canClick()) {
|
||||
return;
|
||||
}
|
||||
@ -80,11 +86,14 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
final ListBean bean = (ListBean) tag;
|
||||
CommonHttpUtil.setAttention(bean.getUid(), null);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
mFollowClickListener2 = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ViewClicksAntiShake.clicksAntiShake(v, () -> {
|
||||
if (!canClick()) {
|
||||
return;
|
||||
}
|
||||
@ -94,6 +103,8 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
final ListBean bean = mList.get(position);
|
||||
CommonHttpUtil.setAttention(bean.getUid(), null);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@ -244,9 +255,9 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
mBtnFollow1.setOnClickListener(mFollowClickListener1);
|
||||
mBtnFollow2.setOnClickListener(mFollowClickListener1);
|
||||
mBtnFollow3.setOnClickListener(mFollowClickListener1);
|
||||
svga1 = (SVGAImageView)itemView.findViewById(R.id.svga1);
|
||||
svga2 = (SVGAImageView)itemView.findViewById(R.id.svga2);
|
||||
svga3 = (SVGAImageView)itemView.findViewById(R.id.svga3);
|
||||
svga1 = (SVGAImageView) itemView.findViewById(R.id.svga1);
|
||||
svga2 = (SVGAImageView) itemView.findViewById(R.id.svga2);
|
||||
svga3 = (SVGAImageView) itemView.findViewById(R.id.svga3);
|
||||
|
||||
// mDataGroup2 = itemView.findViewById(R.id.data_group_2);
|
||||
// mDataGroup3 = itemView.findViewById(R.id.data_group_3);
|
||||
@ -260,7 +271,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
ListBean bean = mTopList.get(0);
|
||||
svga1.setVisibility(View.GONE);
|
||||
|
||||
if (bean.getDress_head()!= null) {
|
||||
if (bean.getDress_head() != null) {
|
||||
if (bean.getDress_head().contains("svga")) {
|
||||
svga1.setVisibility(View.VISIBLE);
|
||||
|
||||
@ -289,7 +300,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
if (payload == null) {
|
||||
mItem1.setTag(bean);
|
||||
mItem1.setVisibility(View.VISIBLE);
|
||||
ImgLoader.display(mContext,bean.getAvatarThumb(), mAvatar1);
|
||||
ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar1);
|
||||
mName1.setText(bean.getUserNiceName());
|
||||
mVotes1.setText(bean.getTotalCoinFormat());
|
||||
mSex1.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
@ -300,14 +311,14 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
}
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext,levelBean.getThumb(), mLevel1);
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel1);
|
||||
}
|
||||
}
|
||||
mBtnFollow1.setTag(bean);
|
||||
liveing1.setVisibility(View.INVISIBLE);
|
||||
if(bean.getIslive() == 1){
|
||||
if (bean.getIslive() == 1) {
|
||||
liveing1.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
} else {
|
||||
liveing1.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
if (bean.getAttention() == 1) {
|
||||
@ -326,7 +337,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
ListBean bean = mTopList.get(1);
|
||||
svga2.setVisibility(View.GONE);
|
||||
|
||||
if (bean.getDress_head()!= null) {
|
||||
if (bean.getDress_head() != null) {
|
||||
if (bean.getDress_head().contains("svga")) {
|
||||
svga2.setVisibility(View.VISIBLE);
|
||||
|
||||
@ -355,9 +366,9 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
if (payload == null) {
|
||||
mItem2.setVisibility(View.VISIBLE);
|
||||
mItem2.setTag(bean);
|
||||
ImgLoader.display(mContext,bean.getAvatarThumb(), mAvatar2);
|
||||
ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar2);
|
||||
mName2.setText(bean.getUserNiceName());
|
||||
mVotes2.setText(bean.getTotalCoinFormat() + " " );
|
||||
mVotes2.setText(bean.getTotalCoinFormat() + " ");
|
||||
mSex2.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
LevelBean levelBean = null;
|
||||
if (mType == TYPE_PROFIT) {
|
||||
@ -366,14 +377,14 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
}
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext,levelBean.getThumb(), mLevel2);
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel2);
|
||||
}
|
||||
}
|
||||
mBtnFollow2.setTag(bean);
|
||||
liveing2.setVisibility(View.INVISIBLE);
|
||||
if(bean.getIslive() == 1){
|
||||
if (bean.getIslive() == 1) {
|
||||
liveing2.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
} else {
|
||||
liveing2.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
if (bean.getAttention() == 1) {
|
||||
@ -404,7 +415,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
if (topSize > 2) {
|
||||
ListBean bean = mTopList.get(2);
|
||||
|
||||
if (bean.getDress_head()!= null) {
|
||||
if (bean.getDress_head() != null) {
|
||||
svga3.setVisibility(View.GONE);
|
||||
if (bean.getDress_head().contains("svga")) {
|
||||
svga3.setVisibility(View.VISIBLE);
|
||||
@ -434,9 +445,9 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
if (payload == null) {
|
||||
mItem3.setVisibility(View.VISIBLE);
|
||||
mItem3.setTag(bean);
|
||||
ImgLoader.display(mContext,bean.getAvatarThumb(), mAvatar3);
|
||||
ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar3);
|
||||
mName3.setText(bean.getUserNiceName());
|
||||
mVotes3.setText(bean.getTotalCoinFormat() + " " );
|
||||
mVotes3.setText(bean.getTotalCoinFormat() + " ");
|
||||
mSex3.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
LevelBean levelBean = null;
|
||||
if (mType == TYPE_PROFIT) {
|
||||
@ -445,14 +456,14 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
}
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext,levelBean.getThumb(), mLevel3);
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel3);
|
||||
}
|
||||
}
|
||||
mBtnFollow3.setTag(bean);
|
||||
liveing3.setVisibility(View.INVISIBLE);
|
||||
if(bean.getIslive() == 1){
|
||||
if (bean.getIslive() == 1) {
|
||||
liveing3.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
} else {
|
||||
liveing3.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
if (bean.getAttention() == 1) {
|
||||
@ -513,7 +524,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
void setData(ListBean bean, int position, Object payload) {
|
||||
if (payload == null) {
|
||||
svga.setVisibility(View.GONE);
|
||||
if (bean.getDress_head()!= null) {
|
||||
if (bean.getDress_head() != null) {
|
||||
if (bean.getDress_head().contains("svga")) {
|
||||
svga.setVisibility(View.VISIBLE);
|
||||
try {
|
||||
@ -538,10 +549,10 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
}
|
||||
}
|
||||
itemView.setTag(bean);
|
||||
mOrder.setText(""+ (position + 4));
|
||||
ImgLoader.display(mContext,bean.getAvatarThumb(), mAvatar);
|
||||
mOrder.setText("" + (position + 4));
|
||||
ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar);
|
||||
mName.setText(bean.getUserNiceName());
|
||||
mVotes.setText(bean.getTotalCoinFormat() + " " );
|
||||
mVotes.setText(bean.getTotalCoinFormat() + " ");
|
||||
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
LevelBean levelBean = null;
|
||||
if (mType == TYPE_PROFIT) {
|
||||
@ -550,13 +561,13 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
||||
levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
}
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext,levelBean.getThumb(), mLevel);
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||
}
|
||||
}
|
||||
liveing.setVisibility(View.INVISIBLE);
|
||||
if(bean.getIslive() == 1){
|
||||
if (bean.getIslive() == 1) {
|
||||
liveing.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
} else {
|
||||
liveing.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
mBtnFollow.setTag(position);
|
||||
|
@ -2,18 +2,20 @@ package com.yunbao.main.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.main.BuildConfig;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.bean.SettingBean;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -42,6 +44,7 @@ public class SettingAdapter extends RecyclerView.Adapter {
|
||||
mOnClickListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ViewClicksAntiShake.clicksAntiShake(v, () -> {
|
||||
Object tag = v.getTag();
|
||||
if (tag != null) {
|
||||
int position = (int) tag;
|
||||
@ -50,6 +53,8 @@ public class SettingAdapter extends RecyclerView.Adapter {
|
||||
mOnItemClickListener.onItemClick(bean, position);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -134,7 +139,7 @@ public class SettingAdapter extends RecyclerView.Adapter {
|
||||
mName.setText(bean.getName());
|
||||
if (bean.getId() == Constants.SETTING_CLEAR_CACHE) {
|
||||
mText.setText(mCacheString);
|
||||
}else if(bean.getId() == 19){
|
||||
} else if (bean.getId() == 19) {
|
||||
mText.setText(BuildConfig.VERSION_NAME);
|
||||
mText.setTextColor(Color.parseColor("#969696"));
|
||||
} else {
|
||||
|
@ -17,6 +17,7 @@ import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.InstructorRemarkManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.activity.PDLIiveChatActivity;
|
||||
import com.yunbao.live.activity.PDLiveConversationActivity;
|
||||
import com.yunbao.live.bean.SearchUserBean;
|
||||
@ -245,7 +246,7 @@ public class ConversationIMListManager {
|
||||
*/
|
||||
@Override
|
||||
public boolean onConversationClick(Context context, View view, BaseUiConversation baseUiConversation) {
|
||||
jumpConversation((Activity) context, baseUiConversation.mCore.getTargetId());
|
||||
ViewClicksAntiShake.clicksAntiShake(view, () -> jumpConversation((Activity) context, baseUiConversation.mCore.getTargetId()));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
@ -451,20 +451,13 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ViewClicksAntiShake.clicksAntiShake(v, () -> {
|
||||
int i = v.getId();
|
||||
if (i == R.id.lt_name) {
|
||||
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
|
||||
} else if (i == R.id.signature) {
|
||||
mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
|
||||
}
|
||||
// else if (i == R.id.btn_follow) {
|
||||
// forwardFollow();
|
||||
// }
|
||||
// else if (i == R.id.btn_fans) {
|
||||
// forwardFans();
|
||||
// } else if (i == R.id.btn_msg) {
|
||||
// ChatActivity.forward(mContext);
|
||||
// }
|
||||
else if (i == R.id.lt_star_coin) {
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
} else if (i == R.id.btn_coin) {
|
||||
@ -483,6 +476,8 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
String url = CommonAppConfig.HOST + "/h5/Nobility.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid();
|
||||
ZhuangBanActivity.forward(mContext, url, false);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user