Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,3 @@
"Demo.TRTC.Buy.chatroom" = "The number of chat rooms created has reached the maximum. Please go to the Tencent Cloud website (xxx) to enable **IM Audio-Video Chat Room** for your account.";
"Demo.TRTC.Buy.grouplimit" = "The number of groups a user is allowed to create and join has exceeded the limit. Please purchase a package. For pricing details, see xxx.";
"Demo.TRTC.Buy.groupmemberlimit" = "The number of group members has exceeded the limit. Please purchase a package. For pricing details, see xxx.";
"Demo.TRTC.Salon.leave" = "Leave The Room...";
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,3 @@
"Demo.TRTC.Buy.chatroom" = "您当前使用的云通讯账号未开通音视频聊天室功能,创建聊天室数量超过限额,请前往腾讯云官网开通【IM音视频聊天室】,地址:xxx";
"Demo.TRTC.Buy.grouplimit" = "单个用户可创建和加入的群组数量超过了限制,请购买相关套餐,价格地址:xxx";
"Demo.TRTC.Buy.groupmemberlimit" = "群成员数量超过限制,请参考,请购买相关套餐,价格地址:xxx";
"Demo.TRTC.Salon.leave" = "正在退出房间...";


Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,6 @@ extension TRTCChatSalonRootView: TRTCChatSalonViewResponder {
func recoveryVoiceSetting() {
}

func showExitTip() {
self.makeToast(String.leaveRoomText, duration: 15.0, position: .center)
}

func dismissTip() {
self.hideToast()
}

func audienceListRefresh() {
seatCollection.reloadData()
Expand Down Expand Up @@ -677,8 +670,6 @@ fileprivate extension String {
static let alertAudienceTitle = ChatSalonLocalize("Demo.TRTC.Salon.surewanttoleaveroom")
static let alertAudienceConfirm = ChatSalonLocalize("Demo.TRTC.Salon.audienceconfirm")
static let alertAudienceCancel = ChatSalonLocalize("Demo.TRTC.Salon.waitabit")
static let leaveRoomText = ChatSalonLocalize("Demo.TRTC.Salon.leave")

}

fileprivate extension UIColor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ protocol TRTCChatSalonViewResponder: NSObject {
func showAudioEffectView()
func stopPlayBGM() // 停止播放音乐
func recoveryVoiceSetting() // 恢复音效设置
func showExitTip() //退出房间提示
func dismissTip()

}

class TRTCChatSalonViewModel: NSObject {
Expand Down Expand Up @@ -107,7 +104,8 @@ class TRTCChatSalonViewModel: NSObject {
debugPrint("chatSalonUserInfo is nil")
return
}
self.viewResponder?.showExitTip()

viewResponder?.popToPrevious()
isExitingRoom = true
if userId == roomInfo.ownerId && roomType == .anchor {
dependencyContainer.destroyRoom(roomId: "\(roomInfo.roomID)") {
Expand All @@ -119,16 +117,12 @@ class TRTCChatSalonViewModel: NSObject {
chatSalon.destroyRoom { [weak self] (code, message) in
guard let `self` = self else { return }
self.isExitingRoom = false
self.viewResponder?.dismissTip()
self.viewResponder?.popToPrevious()
}
return
}
chatSalon.exitRoom { [weak self] (code, message) in
guard let `self` = self else { return }
self.isExitingRoom = false
self.viewResponder?.dismissTip()
self.viewResponder?.popToPrevious()
}
}

Expand Down
Loading