mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Only use the Element Call timeoutTask for room calls.
SPA call links were being timed out too 🤦♂️
This commit is contained in:
@@ -112,17 +112,6 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
|||||||
.store(in: &cancellables)
|
.store(in: &cancellables)
|
||||||
|
|
||||||
setupCall()
|
setupCall()
|
||||||
|
|
||||||
timeoutTask = Task { [weak self] in
|
|
||||||
try? await Task.sleep(for: .seconds(10))
|
|
||||||
guard !Task.isCancelled, let self else { return }
|
|
||||||
MXLog.error("Failed to join Element Call: Timeout")
|
|
||||||
state.bindings.alertInfo = .init(id: UUID(),
|
|
||||||
title: L10n.commonError,
|
|
||||||
message: L10n.errorUnknown,
|
|
||||||
primaryButton: .init(title: L10n.actionDismiss) { [weak self] in self?.actionsSubject.send(.dismiss) })
|
|
||||||
timeoutTask = nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override func process(viewAction: CallScreenViewAction) {
|
override func process(viewAction: CallScreenViewAction) {
|
||||||
@@ -218,6 +207,17 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
|||||||
await elementCallService.setupCallSession(roomID: roomProxy.id,
|
await elementCallService.setupCallSession(roomID: roomProxy.id,
|
||||||
roomDisplayName: roomProxy.infoPublisher.value.displayName ?? roomProxy.id)
|
roomDisplayName: roomProxy.infoPublisher.value.displayName ?? roomProxy.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timeoutTask = Task { [weak self] in
|
||||||
|
try? await Task.sleep(for: .seconds(10))
|
||||||
|
guard !Task.isCancelled, let self else { return }
|
||||||
|
MXLog.error("Failed to join Element Call: Timeout")
|
||||||
|
state.bindings.alertInfo = .init(id: UUID(),
|
||||||
|
title: L10n.commonError,
|
||||||
|
message: L10n.errorUnknown,
|
||||||
|
primaryButton: .init(title: L10n.actionDismiss) { [weak self] in self?.actionsSubject.send(.dismiss) })
|
||||||
|
timeoutTask = nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user