Jelajahi Sumber

fix: house gift

tongmengxiao 5 bulan lalu
induk
melakukan
79168bf11b

+ 1 - 1
room/src/main/java/com/swago/room/gift/GiftDialog.kt

@@ -335,7 +335,7 @@ class GiftDialog : BaseXDFragment<DialogGiftBinding>() {
             })
 
             SwagoRoomManager.iRoomInfo?.let {
-                if(it.getRoomType() == 1){
+                if(it.getRoomType() == 1 || it.getRoomType() == 3){
                     when (GiftConfig.giftSelectedWhichType) {
                         1 -> {
                             binding.viewPager.currentItem = 1

+ 1 - 1
room/src/main/java/com/swago/room/gift/GiftFragment.kt

@@ -59,7 +59,7 @@ class GiftFragment : BaseXFragment<FragmentGiftBinding>() {
             data?.let {
                 if (it.isEmpty()) return@let
                 SwagoRoomManager.iRoomInfo?.let {iRoomInfo ->
-                    if (iRoomInfo.getRoomType() == 1){
+                    if (iRoomInfo.getRoomType() == 1 || iRoomInfo.getRoomType() == 3){
                         if (GiftConfig.giftSelectedWhichType == type){
                             it[GiftConfig.giftSelectedPageIndex * 8 + GiftConfig.giftSelectedPageSelectedPosition].isSelected =
                                 true

+ 1 - 1
room/src/main/java/com/swago/room/gift/GiftPagerAdapter.kt

@@ -61,7 +61,7 @@ class GiftPagerAdapter(private val type: Int, layoutResId: Int, data: List<Array
             }
             selected = position
             SwagoRoomManager.iRoomInfo?.let {
-                if (it.getRoomType() == 1){
+                if (it.getRoomType() == 1 || it.getRoomType() == 3){
                     GiftConfig.giftCoin = item[position].gift_coins.toInt()
                     GiftConfig.giftSelectedWhichType = type
                     GiftConfig.giftSelectedPageSelectedPosition = position