守护团新增红点
This commit is contained in:
@@ -962,6 +962,8 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
} else if (TextUtils.equals(event.getRightsInterests(), getString(com.yunbao.common.R.string.guard_guard))) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GUARD));
|
||||
|
||||
manager.onGuardRed();
|
||||
//跳转粉丝团
|
||||
} else if (TextUtils.equals(event.getRightsInterests(), getString(com.yunbao.common.R.string.fan_club))) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
@@ -1850,6 +1852,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
} else if (TextUtils.equals(event.getRightsInterests(), getString(com.yunbao.common.R.string.guard_guard))) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GUARD));
|
||||
manager.onGuardRed();
|
||||
//跳转粉丝团
|
||||
} else if (TextUtils.equals(event.getRightsInterests(), getString(com.yunbao.common.R.string.fan_club))) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
@@ -1898,7 +1901,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (isShow) {
|
||||
manager.mLiveAudienceViewHolder.mRedPointPrivilege.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
if (IMLoginManager.get(mContext).getRedPoint()) {
|
||||
if (IMLoginManager.get(mContext).getRedPoint() || IMLoginManager.get(mContext).getGuardRedPoint()) {
|
||||
manager.mLiveAudienceViewHolder.mRedPointPrivilege.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
manager.mLiveAudienceViewHolder.mRedPointPrivilege.setVisibility(View.GONE);
|
||||
@@ -1926,7 +1929,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
@Override
|
||||
public void run() {
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new DragonExpirePopup(mContext, mLiveUid, maturityDateRemindModel,mStream))
|
||||
.asCustom(new DragonExpirePopup(mContext, mLiveUid, maturityDateRemindModel, mStream))
|
||||
.show();
|
||||
}
|
||||
}, 3000);
|
||||
|
||||
@@ -115,6 +115,7 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
|
||||
guardIcon = findViewById(R.id.guard_imageView);
|
||||
giftSvga = findViewById(R.id.gift_svga);
|
||||
btnGuardOpen = findViewById(R.id.btn_guard_open);
|
||||
IMLoginManager.get(mContext).setGuardRedPoint();
|
||||
if (WordUtil.isNewZh()) {
|
||||
ViewGroup.LayoutParams layoutParams = guardian_task_view.getLayoutParams();
|
||||
layoutParams.width = DpUtil.dp2px(50);
|
||||
|
||||
@@ -185,6 +185,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
.setActivity(false)
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.BOTTOM_COLLECTION));
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
//玩
|
||||
@@ -368,6 +369,25 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
}
|
||||
}
|
||||
});
|
||||
if (IMLoginManager.get(mContext).getGuardRedPoint()) {
|
||||
findViewById(R.id.total_image_red_point).setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
findViewById(R.id.total_image_red_point).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void onGuardRed() {
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (IMLoginManager.get(mContext).getGuardRedPoint()) {
|
||||
findViewById(R.id.total_image_red_point).setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
findViewById(R.id.total_image_red_point).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
},1000);
|
||||
|
||||
}
|
||||
|
||||
public void setGiftRemainingQuantity(String giftRemainingQuantity) {
|
||||
|
||||
@@ -2228,4 +2228,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mLiveRoomViewHolder.onSendMoneyLongEndEvent(moneyLongEndEvent);
|
||||
}
|
||||
}
|
||||
public void onGuardRed(){
|
||||
if (mLiveAudienceViewHolder!=null){
|
||||
mLiveAudienceViewHolder.onGuardRed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,13 +465,28 @@
|
||||
tools:visibility="visible" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!--普通工具合集-->
|
||||
<ImageView
|
||||
android:id="@+id/total_image"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_more_live_menu" />
|
||||
<RelativeLayout
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="38dp">
|
||||
<!--普通工具合集-->
|
||||
<ImageView
|
||||
android:id="@+id/total_image"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/icon_more_live_menu" />
|
||||
|
||||
<View
|
||||
android:id="@+id/total_image_red_point"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="6dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/bg_red_point"
|
||||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user