[Modify]修改免费礼物逻辑
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user