fix:修正個播房遊戲玩法入口的顯示問題
This commit is contained in:
@@ -26,6 +26,7 @@ import com.chwl.app.fansteam.FansTeamJoinActivity
|
||||
import com.chwl.app.fansteam.FansTeamJoinedActivity
|
||||
import com.chwl.app.fansteam.FansTeamViewModel
|
||||
import com.chwl.app.music.widget.MusicPlayerView
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
||||
import com.chwl.app.ui.webview.CommonWebViewActivity
|
||||
import com.chwl.app.ui.webview.DialogWebViewActivity
|
||||
import com.chwl.core.UriProvider
|
||||
@@ -36,6 +37,10 @@ import com.chwl.core.im.custom.bean.RequestUpmicAttachment
|
||||
import com.chwl.core.im.custom.bean.RoomPKAttachment
|
||||
import com.chwl.core.manager.AvRoomDataManager
|
||||
import com.chwl.core.manager.RoomEvent
|
||||
import com.chwl.core.room.core.RoomDataService
|
||||
import com.chwl.core.room.model.AvRoomModel
|
||||
import com.chwl.core.support.room.AudioRoomContext.Companion.get
|
||||
import com.chwl.core.support.room.RoomAbility
|
||||
import com.chwl.core.user.bean.UserInfo
|
||||
import com.chwl.library.base.factory.CreatePresenter
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
@@ -63,6 +68,8 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
private lateinit var gameBinding: FragmentSingleRoomBinding
|
||||
private lateinit var upMicDialog: RequestUpMicDialog
|
||||
|
||||
private var hasBaishunGames = false
|
||||
|
||||
private val fansTeamViewModel: FansTeamViewModel by viewModels()
|
||||
override fun getRootLayoutId(): Int {
|
||||
return R.layout.fragment_single_room
|
||||
@@ -92,6 +99,48 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
updateFansTeamInfo(it)
|
||||
}
|
||||
}
|
||||
|
||||
requestData()
|
||||
}
|
||||
|
||||
private fun requestData() {
|
||||
val dataService = get()!!.findAbility<RoomAbility>(
|
||||
RoomDataService::class.java.simpleName
|
||||
) as RoomDataService?
|
||||
val cacheKey = "gameplay_list#" + hashCode()
|
||||
val disposable = AvRoomModel.get().roomGamePlayList.doOnError {
|
||||
updateConfigButtonArea()
|
||||
}.subscribe { roomIcons ->
|
||||
dataService?.putData(cacheKey, roomIcons)
|
||||
hasBaishunGames = roomIcons.size > 0
|
||||
updateConfigButtonArea()
|
||||
}
|
||||
}
|
||||
|
||||
fun updateConfigButtonArea() {
|
||||
// val configModel = AvRoomDataManager.get().rightBottomIconConfig
|
||||
// if (configModel == null) {
|
||||
// gameBinding.ivConfigEntrance.visibility = View.GONE
|
||||
// } else {
|
||||
// if (configModel.icon1Url == null) {
|
||||
// gameBinding.ivConfigEntrance.visibility = View.GONE
|
||||
// } else {
|
||||
// ImageLoadUtils.loadAvatar(configModel.icon1Url, gameBinding.ivConfigEntrance)
|
||||
// gameBinding.ivConfigEntrance.visibility = View.VISIBLE
|
||||
// }
|
||||
// if (configModel.icon2Url != null) {
|
||||
// ImageLoadUtils.loadAvatar(configModel.icon2Url, gameBinding.ivGame)
|
||||
// }
|
||||
// }
|
||||
// if (AvRoomDataManager.get().isDatingMode) {
|
||||
// gameBinding.ivGame.visibility = View.GONE
|
||||
// } else {
|
||||
// if (hasBaishunGames) {
|
||||
// gameBinding.ivGame.visibility = View.VISIBLE
|
||||
// } else {
|
||||
// gameBinding.ivGame.visibility = View.GONE
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
override fun onReceiveRoomEvent(roomEvent: RoomEvent?) {
|
||||
|
@@ -270,6 +270,9 @@ public class BottomView extends LinearLayout implements View.OnClickListener {
|
||||
pkGameView.setVisibility(GONE);
|
||||
iconRoomBaiShunGame.setVisibility(GONE);
|
||||
}
|
||||
if (AvRoomDataManager.get().isSingleRoom()) {
|
||||
pkGameView.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void showHomePartyDownMicBottom() {
|
||||
|
@@ -171,6 +171,38 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_music" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_view">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_38"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_above="@id/iv_game"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/room_ic_collect_no"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_game"
|
||||
android:layout_width="@dimen/dp_38"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/room_ic_game"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.chwl.app.avroom.widget.BottomView
|
||||
android:id="@+id/bottom_view"
|
||||
android:layout_width="0dp"
|
||||
@@ -211,6 +243,8 @@
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/input_layout"
|
||||
android:layout_width="0dp"
|
||||
@@ -218,8 +252,10 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
@@ -254,13 +290,13 @@
|
||||
android:src="@android:drawable/ic_menu_send" />
|
||||
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:id="@+id/input_headline_send"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/room_ic_headline_send" />
|
||||
android:src="@drawable/room_ic_headline_send"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
@@ -132,7 +132,9 @@
|
||||
android:layout_height="@dimen/dp_29"
|
||||
android:layout_marginStart="@dimen/dp_11"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/room_menu_ic_playlist" />
|
||||
android:src="@drawable/room_menu_ic_playlist"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
Reference in New Issue
Block a user