修复房间bug

This commit is contained in:
liyuhua
2024-03-13 20:49:51 +08:00
parent 9c8e892859
commit 7e663559c0
10 changed files with 33 additions and 17 deletions

View File

@@ -131,7 +131,6 @@ class RoomVC: BaseViewController, HiddenNavigationBarProtocol {
}
private func dealWithChatData(chatData:NIMChatroom){
// self.roomInfo?.onlineNum = chatData.onlineUserCount
self.topView.roomData = self.roomInfo
self.micSeatView.roomData = self.roomInfo
self.micSeatView.setTRTC()
@@ -145,7 +144,11 @@ class RoomVC: BaseViewController, HiddenNavigationBarProtocol {
if roomData.valid{
UserViewModel.userVM.getUserInfo(uid: uid)
}else{
RoomVCViewModel.roomVM.openRoom(title: self.roomInfo?.title ?? "", type: 3, roomPwd: "", roomDesc: "", backPic: "")
var text = self.roomInfo?.title
if self.roomInfo?.title.count == 0{
text = self.roomText
}
RoomVCViewModel.roomVM.openRoom(title: text ?? "", type: 3, roomPwd: "", roomDesc: "", backPic: "")
}
}
@objc func dissChatViewAction(){
@@ -159,6 +162,7 @@ class RoomVC: BaseViewController, HiddenNavigationBarProtocol {
}
var roomUid:String = ""
var roomText:String = ""
var roomInfo:RoomDataModel?
//MARK: -
private lazy var backgroundView:RoomBackgroundView = {
@@ -189,7 +193,7 @@ class RoomVC: BaseViewController, HiddenNavigationBarProtocol {
private lazy var bgChatView:UIButton = {
let _bgChatView = UIButton()
_bgChatView.addTarget(self, action: #selector(dissChatViewAction), for: .touchUpInside)
_bgChatView.backgroundColor = UIColor.init(white: 0, alpha: 0.5)
return _bgChatView
}()
private lazy var chatListVC:ChatListVC = {