라이브 종료 - 방장이 라이브를 종료 했을 때 앱이 죽는 버그 수정
This commit is contained in:
parent
fe046e8006
commit
5301aebe71
|
@ -162,14 +162,13 @@ final class LiveRoomViewModel: NSObject, ObservableObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
func quitRoom() {
|
func quitRoom() {
|
||||||
let roomId = liveRoomInfo?.roomId
|
|
||||||
isLoading = true
|
isLoading = true
|
||||||
|
|
||||||
if let index = muteSpeakers.firstIndex(of: UInt(UserDefaults.int(forKey: .userId))) {
|
if let index = muteSpeakers.firstIndex(of: UInt(UserDefaults.int(forKey: .userId))) {
|
||||||
muteSpeakers.remove(at: index)
|
muteSpeakers.remove(at: index)
|
||||||
}
|
}
|
||||||
|
|
||||||
repository.quitRoom(roomId: roomId!)
|
repository.quitRoom(roomId: AppState.shared.roomId)
|
||||||
.sink { result in
|
.sink { result in
|
||||||
switch result {
|
switch result {
|
||||||
case .finished:
|
case .finished:
|
||||||
|
|
Loading…
Reference in New Issue