1:修改部分bug
This commit is contained in:
2
.idea/vcs.xml
generated
2
.idea/vcs.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/yusheng-android" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -108,8 +108,8 @@ import java.util.*
|
||||
import java.util.stream.Collectors
|
||||
|
||||
@Route(path = ARouteConstants.ROOM_DETAILS)
|
||||
class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
RoomContacts.View, PermissionCallbacks, OnMessageReceivedListener, QXRedPacketManager.QXRedPacketManagerDelegate {
|
||||
class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(), RoomContacts.View, PermissionCallbacks,
|
||||
OnMessageReceivedListener, QXRedPacketManager.QXRedPacketManagerDelegate {
|
||||
private var roomFragment: RoomFragment? = null
|
||||
var commonPageAdapter: CommonPageAdapter? = null
|
||||
private var mRoomBean: RoomBean? = null
|
||||
@@ -1184,7 +1184,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
|
||||
override fun initData() {
|
||||
if (!EasyPermissions.hasPermissions(this, *permissions)) {
|
||||
PermissionDescriptionHelper.addPermissionDescription(false,mBinding?.root as ViewGroup,permissions)
|
||||
PermissionDescriptionHelper.addPermissionDescription(false, mBinding?.root as ViewGroup, permissions)
|
||||
EasyPermissions.requestPermissions(
|
||||
this, "请开启录音使用权限",
|
||||
1, *permissions
|
||||
@@ -1702,9 +1702,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
toPitNumber: String,
|
||||
messageEvent: RoomMessageEvent
|
||||
) {
|
||||
mRoomInfoResp!!.user_info.pit_number = Integer.parseInt(toPitNumber)
|
||||
|
||||
if ("9" == toPitNumber && messageEvent.text.user_id.equals(SpUtil.getUserId().toString())) {
|
||||
if ("9" == toPitNumber && messageEvent.text.fromUserInfo.user_id == SpUtil.getUserId()) {
|
||||
mRoomInfoResp!!.user_info.pit_number = Integer.parseInt(toPitNumber)
|
||||
|
||||
mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
||||
ivSoundEffects(true)
|
||||
} else {
|
||||
@@ -1740,6 +1741,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if (mRoomInfoResp!!.user_info.pit_number == 9) {
|
||||
mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
||||
ivSoundEffects(true)
|
||||
setRoleType(3, 9)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1943,9 +1945,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
aBoolean = true
|
||||
ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding)
|
||||
setBoolean(aBoolean)
|
||||
if (mRoomInfoResp!!.user_info != null) {
|
||||
mRoomInfoResp!!.user_info.pit_number = 0
|
||||
}
|
||||
|
||||
mRoomInfoResp?.user_info?.pit_number = 0
|
||||
setRoleType(0, 0)
|
||||
switchMic(2)
|
||||
}
|
||||
@@ -1969,9 +1970,9 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if ("9" == pitNumber) {
|
||||
if (userId == currentUserId) {
|
||||
mRoomInfoResp!!.room_info.pit_list[0] = getPitBean2(messageEvent, "9")
|
||||
if (mRoomInfoResp!!.user_info != null) {
|
||||
mRoomInfoResp!!.user_info.pit_number = 0
|
||||
}
|
||||
// if (mRoomInfoResp!!.user_info != null) {
|
||||
// mRoomInfoResp!!.user_info.pit_number = 0
|
||||
// }
|
||||
}
|
||||
} else if ("888" == pitNumber) {
|
||||
mRoomInfoResp!!.room_auction = null
|
||||
@@ -2658,13 +2659,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
// if (mRoomInfoResp!!.room_info.label_id == "1") {
|
||||
// queren()
|
||||
// } else {
|
||||
val fragment = RequestDialogFragment.show(
|
||||
roomId, mRoomInfoResp, 1,
|
||||
supportFragmentManager
|
||||
)
|
||||
if (fragment != null) {
|
||||
addActiveDialogFragment(fragment) // 添加到管理列表
|
||||
}
|
||||
val fragment = RequestDialogFragment.show(
|
||||
roomId, mRoomInfoResp, 1,
|
||||
supportFragmentManager
|
||||
)
|
||||
if (fragment != null) {
|
||||
addActiveDialogFragment(fragment) // 添加到管理列表
|
||||
}
|
||||
// }
|
||||
} else if (id == R.id.rl_gift) { //礼物
|
||||
// RoomGiftDialogFragment.show(mRoomInfoResp, null, roomId, 0, "", getSupportFragmentManager());
|
||||
@@ -2916,7 +2917,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
*
|
||||
* @param type
|
||||
*/
|
||||
// @Override
|
||||
// @Override
|
||||
fun switchMic(type: Int) {
|
||||
if (type == 1) {
|
||||
mBinding!!.ivMic.setImageResource(com.xscm.moduleutil.R.mipmap.room_microphone)
|
||||
@@ -3078,14 +3079,17 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
switchMic(2) // 关闭麦克风
|
||||
}
|
||||
}
|
||||
|
||||
pit_number == 888 -> {
|
||||
rl_mic?.visibility = View.VISIBLE
|
||||
switchMic(2) // 关闭麦克风
|
||||
}
|
||||
|
||||
pit_number == -1 -> {
|
||||
rl_mic?.visibility = View.VISIBLE
|
||||
switchMic(1) // 打开麦克风
|
||||
}
|
||||
|
||||
else -> {
|
||||
rl_mic?.visibility = View.GONE
|
||||
switchMic(2) // 关闭麦克风
|
||||
@@ -3102,7 +3106,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if ("1" != typeId) {
|
||||
rl_more?.visibility = View.GONE
|
||||
}
|
||||
if ("1"==typeId && "2" == labelId){
|
||||
if ("1" == typeId && "2" == labelId) {
|
||||
rl_misc?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
@@ -4565,6 +4569,4 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user