下麦退出游戏处理
This commit is contained in:
@@ -377,6 +377,7 @@ class GameRoomFragment() : BaseMvpFragment<IGameRoomView?, GameRoomPresenter?>()
|
||||
RoomEvent.DOWN_MIC -> {
|
||||
if (AvRoomDataManager.get().isOwner(roomEvent.account)) {
|
||||
//自己的消息
|
||||
gameDelegate.notifySelfPlayingState(false)
|
||||
gameDelegate.notifySelfInState(false)
|
||||
}
|
||||
onDownMicro(roomEvent.micPosition)
|
||||
|
@@ -555,7 +555,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
}
|
||||
|
||||
private fun notifySelfPlayingState(isPlaying: Boolean) {
|
||||
fun notifySelfPlayingState(isPlaying: Boolean) {
|
||||
try {
|
||||
//状态名称
|
||||
val state = SudMGPAPPState.APP_COMMON_SELF_PLAYING
|
||||
@@ -639,6 +639,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
fun onDestroy() {
|
||||
notifySelfPlayingState(false)
|
||||
notifySelfInState(false)
|
||||
updateMyMicQueue(GameStatus.STATUS_NOT_JOIN)
|
||||
iSudFSTAPP?.destroyMG()
|
||||
|
@@ -12,6 +12,7 @@ import com.yizhuan.erban.common.widget.CircleImageView;
|
||||
import com.yizhuan.erban.ui.user.UserInfoActivity;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2;
|
||||
import com.yizhuan.xchat_android_core.home.bean.HomeRoomInfo;
|
||||
import com.yizhuan.xchat_android_core.utils.StringExtensionKt;
|
||||
|
||||
public class HomeConcernsAdapter extends BaseQuickAdapter<HomeRoomInfo, BaseViewHolder> {
|
||||
|
||||
@@ -26,7 +27,7 @@ public class HomeConcernsAdapter extends BaseQuickAdapter<HomeRoomInfo, BaseView
|
||||
}
|
||||
CircleImageView circleImageView = helper.getView(R.id.civ_room_avatar);
|
||||
ImageLoadUtilsV2.loadImage(circleImageView, item.getAvatar());
|
||||
helper.setText(R.id.tv_room_name, item.getNick());
|
||||
helper.setText(R.id.tv_room_name, StringExtensionKt.subAndReplaceDot(item.getNick(),4));
|
||||
|
||||
if (item.getRoomUid() > 0) {
|
||||
helper.setVisible(R.id.view_avatar_bg, true);
|
||||
@@ -34,7 +35,11 @@ public class HomeConcernsAdapter extends BaseQuickAdapter<HomeRoomInfo, BaseView
|
||||
if (helper.getView(R.id.view_living).getBackground() instanceof AnimationDrawable) {
|
||||
((AnimationDrawable) helper.getView(R.id.view_living).getBackground()).start();
|
||||
}
|
||||
helper.itemView.setOnClickListener(v -> AVRoomActivity.start(mContext, item.getRoomUid()));
|
||||
helper.itemView.setOnClickListener(v -> AVRoomActivity.startForFromType(mContext,
|
||||
item.getRoomUid(),
|
||||
AVRoomActivity.FROM_TYPE_USER,
|
||||
item.getNick(),
|
||||
String.valueOf(item.getUid())));
|
||||
} else {
|
||||
helper.setVisible(R.id.view_avatar_bg, false);
|
||||
helper.setVisible(R.id.view_living, false);
|
||||
|
@@ -4,6 +4,7 @@ import android.os.Bundle
|
||||
import androidx.core.view.isGone
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
import com.yizhuan.erban.base.BaseViewBindingFragment
|
||||
@@ -51,7 +52,7 @@ class RoomLikeFragment : BaseViewBindingFragment<FragmentRoomLikeBinding>() {
|
||||
likeRvDelegate = RVDelegate.Builder<HomeRoomInfo>()
|
||||
.setAdapter(concernsAdapter)
|
||||
.setRecyclerView(binding.rvLike)
|
||||
.setLayoutManager(LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false))
|
||||
.setLayoutManager(GridLayoutManager(mContext,5, GridLayoutManager.VERTICAL, false))
|
||||
.build()
|
||||
|
||||
homeViewModel.concernsLiveData.observe(this) {
|
||||
|
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container_item_room_history"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
@@ -44,9 +44,7 @@
|
||||
android:id="@+id/tv_room_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="12dp"
|
||||
|
Reference in New Issue
Block a user