铭牌,装饰,礼物值bugfix

This commit is contained in:
oujunhui
2020-05-25 15:20:39 +08:00
parent 1b005e3d22
commit 25a720cb2b
11 changed files with 29 additions and 31 deletions

View File

@@ -321,7 +321,7 @@ public class MicroViewAdapter extends BaseMicroViewAdapter {
if (!TextUtils.isEmpty(fixedWord) && !TextUtils.isEmpty(iconPic)) {
inOfficialMask.setVisibility(View.VISIBLE);
tvOfficialMask.setText(fixedWord);
NobleUtil.loadResource(iconPic, ivOfficialMask);
ImageLoadUtils.loadImage(context,iconPic, ivOfficialMask);
} else {
inOfficialMask.setVisibility(View.GONE);

View File

@@ -79,15 +79,18 @@ public class MyCarAdapter extends BaseAdapter<CarInfo> {
tvUsed.setText("使用");
tvUsed.setBackgroundResource(R.drawable.bg_my_head_invalid);
tvUsed.setEnabled(false);
tvUsed.setTextColor(mContext.getResources().getColor(R.color.color_999999));
} else if (isUsing) {
tvUsed.setVisibility(View.VISIBLE);
tvUsed.setText("取消使用");
tvUsed.setBackgroundResource(R.drawable.bg_my_head_invalid);
tvUsed.setEnabled(true);
tvUsed.setTextColor(mContext.getResources().getColor(R.color.color_333333));
} else {
tvUsed.setVisibility(View.VISIBLE);
tvUsed.setText("使用");
tvUsed.setBackgroundResource(R.drawable.bg_my_head_buy);
tvUsed.setTextColor(mContext.getResources().getColor(R.color.white));
tvUsed.setEnabled(true);
}

View File

@@ -48,6 +48,7 @@ import io.reactivex.functions.Consumer;
public class DecorationStoreActivity extends BaseBindingActivity<ActivityDecorationStoreBinding> implements CarMagicIndicator.OnItemSelectListener {
public final static int TAB_HEAD_WEAR = 0;
public final static int TAB_CAR = 1;
public final static int TAB_NAMEPLATE = 2;
private SVGAParser mSVGAParser;
private long userId;

View File

@@ -114,11 +114,13 @@ public class RouterHandler {
MyDecorationActivity.start(context, 0);
}
break;
case RouterType.SYS_MSG:
FamilyCurrencyActivity.start(context);
case RouterType.NAMEPLATE:
if (JavaUtil.str2int(routerValue) == 0) {
DecorationStoreActivity.start(context, AuthModel.get().getCurrentUid(), DecorationStoreActivity.TAB_NAMEPLATE);
} else {
MyDecorationActivity.start(context, 2);
}
break;
case RouterType.FAMILY:
FamilyHomeActivity.start(context, routerValue);
break;

View File

@@ -118,13 +118,13 @@
android:id="@+id/in_official_mask"
android:layout_marginStart="5dp"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_15"
android:layout_height="@dimen/dp_17"
layout="@layout/layout_official_mask"/>
<TextView
android:id="@+id/tv_constellation"
android:layout_width="wrap_content"
android:layout_height="15dp"
android:layout_height="17dp"
android:background="@drawable/shape_58559d"
android:gravity="center"
android:paddingLeft="5dp"

View File

@@ -53,14 +53,8 @@
app:layout_constraintTop_toTopOf="@id/widget_nick_detail"
android:layout_marginEnd="@dimen/dp_8"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"

View File

@@ -124,18 +124,17 @@ public class WorldDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, Base
widget.setData(item);
View inOfficialMask = helper.getView(R.id.in_official_mask);
if (item.getNameplate() != null) {
if (!TextUtils.isEmpty(item.getNameplateWord()) && !TextUtils.isEmpty(item.getNameplatePic())) {
inOfficialMask.setVisibility(View.VISIBLE);
TextView tvOfficialMask = inOfficialMask.findViewById(R.id.tv_official_mask);
if (tvOfficialMask != null) {
tvOfficialMask.setText(item.getNameplate().getFixedWord());
tvOfficialMask.setText(item.getNameplateWord());
}
ImageView ivOfficialMask = inOfficialMask.findViewById(R.id.iv_official_mask);
if (ivOfficialMask != null) {
NobleUtil.loadResource(item.getNameplate().getIconPic(), ivOfficialMask);
NobleUtil.loadResource(item.getNameplatePic(), ivOfficialMask);
}
} else {
inOfficialMask.setVisibility(View.GONE);
}

View File

@@ -214,9 +214,6 @@ public class SquareDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, Bas
TopicMainActivity.start(context, String.valueOf(item.getWorldId()));
}
});
}
private void setLikeCount(BaseViewHolder helper, int likeCount, boolean isLike, boolean isAnim) {

View File

@@ -2,6 +2,8 @@ package com.yizhuan.erban.community.widget;
import android.content.Context;
import androidx.constraintlayout.widget.ConstraintLayout;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
@@ -88,7 +90,7 @@ public class DynamicNickDetailWidget extends ShapeConstrainLayout {
//魅力等级
ImageLoadUtils.loadImage(context, info.getCharmLevelPic(), ivUserCharmLevel);
//铭牌
if (info.getNameplateWord() != null) {
if (!TextUtils.isEmpty(info.getNameplateWord()) && !TextUtils.isEmpty(info.getNameplatePic())) {
inOfficialMask.setVisibility(View.VISIBLE);
TextView tvOfficialMask = inOfficialMask.findViewById(R.id.tv_official_mask);
if (tvOfficialMask != null) {

View File

@@ -46,9 +46,9 @@ public class RouterType {
public static final int DECORATION = 8;
/**
* 9-家族钻石 传参:家族 id(FamilyId) 跳转到家族钻石页面;
* 9-铭牌 传参0装扮商城 或者 1铭牌库
*/
public static final int SYS_MSG = 9;
public static final int NAMEPLATE = 9;
/**
* 10-家族 传参:家族 id(FamilyId) 跳转到家族客态页;

View File

@@ -172,8 +172,8 @@ public class GiftValueMrg {
if (roomQueueInfo.giftValueData == null) {
roomQueueInfo.giftValueData = new GiftValueData();
}
long value = giftValueArray.get(micUid, 0L);
if (value > 0) {
long value = giftValueArray.get(micUid, -1L);
if (value >= 0) {
roomQueueInfo.giftValueData.updateValue(value);
}
} else if (key == -1 && AvRoomDataManager.get().isLeaveMode()) { // 离开模式礼物值变化
@@ -181,8 +181,8 @@ public class GiftValueMrg {
if (roomQueueInfo.giftValueData == null) {
roomQueueInfo.giftValueData = new GiftValueData();
}
long value = giftValueArray.get(micUid, 0L);
if (value > 0) {
long value = giftValueArray.get(micUid, -1L);
if (value >= 0) {
roomQueueInfo.giftValueData.updateValue(value);
}
}
@@ -212,15 +212,15 @@ public class GiftValueMrg {
GiftValueData giftValueData = roomQueueInfo.giftValueData;
if (roomQueueInfo.mChatRoomMember != null) {
long micUid = JavaUtil.str2long(roomQueueInfo.mChatRoomMember.getAccount());
long newValue = array.get(micUid, 0L);
if (newValue > 0){
long newValue = array.get(micUid, -1L);
if (newValue >= 0){
giftValueData.updateValue(newValue);
}
} else {
if (AvRoomDataManager.get().isLeaveMode() && key == -1) { // 离开模式礼物值变化
long micUid = AvRoomDataManager.get().getRoomUid();
long newValue = array.get(micUid, 0L);
if (newValue > 0){
long newValue = array.get(micUid, -1L);
if (newValue >= 0){
giftValueData.updateValue(newValue);
}
} else{