라이브 종료 - 방장이 라이브를 종료 했을 때 앱이 죽는 버그 수정

This commit is contained in:
Yu Sung 2023-08-21 05:23:27 +09:00
parent fe046e8006
commit 5301aebe71
1 changed files with 1 additions and 2 deletions

View File

@ -162,14 +162,13 @@ final class LiveRoomViewModel: NSObject, ObservableObject {
}
func quitRoom() {
let roomId = liveRoomInfo?.roomId
isLoading = true
if let index = muteSpeakers.firstIndex(of: UInt(UserDefaults.int(forKey: .userId))) {
muteSpeakers.remove(at: index)
}
repository.quitRoom(roomId: roomId!)
repository.quitRoom(roomId: AppState.shared.roomId)
.sink { result in
switch result {
case .finished: