[Modify]修改免费礼物逻辑

This commit is contained in:
wushaocheng
2022-12-16 11:48:33 +08:00
parent a33918e520
commit 6e4fe74239
2 changed files with 8 additions and 1 deletions

View File

@@ -145,6 +145,8 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
private var isCloseScreen = false
private var isOpenRedPackage = false
private var roomFreeGiftDialog: RoomFreeGiftDialog? = null
@JvmField
protected var isDatingMode = false
@@ -1201,7 +1203,11 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
@Subscribe(threadMode = ThreadMode.MAIN)
fun onRoomFreeGiftEvent(event: RoomFreeGiftEvent) {
event.giftFreeInfo?.let {
RoomFreeGiftDialog(context, it).show()
if (roomFreeGiftDialog?.isShowing == true) {
roomFreeGiftDialog?.dismiss()
}
roomFreeGiftDialog = RoomFreeGiftDialog(context, it)
roomFreeGiftDialog?.show()
}
}

View File

@@ -628,6 +628,7 @@ public class CustomAttachParser implements MsgAttachmentParser {
if (second == ROOM_FREE_GIFT_REST) {
GiftModel.get().getFreeGift(true).subscribe();
}else if(second == ROOM_FREE_GIFT_CHANGE){
GiftModel.get().getFreeGift(false).subscribe();
attachment = new RoomFreeGiftAttachment(first, second);
}
break;