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