diff --git a/SodaLive/Sources/Live/Room/LiveRoomViewModel.swift b/SodaLive/Sources/Live/Room/LiveRoomViewModel.swift index 43a61b0..939d1ce 100644 --- a/SodaLive/Sources/Live/Room/LiveRoomViewModel.swift +++ b/SodaLive/Sources/Live/Room/LiveRoomViewModel.swift @@ -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: