in AzureCommunicationUI/sdk/AzureCommunicationUICalling/Sources/Presentation/SwiftUI/Calling/CallingViewComponent/CaptionsRtt/CaptionsErrorViewModel.swift [34:59]
func update(captionsState: CaptionsState, callingState: CallingState) {
if callingState.status != .connected || captionsState.errors == .none {
return
}
switch captionsState.errors {
case .captionsFailedToStart:
displayNotification(localizationKey: .captionsStartCaptionsError,
icon: .captionsError,
isPersistent: false)
case .captionsFailedToStop:
displayNotification(localizationKey: .captionsStopCaptionsError,
icon: .captionsError,
isPersistent: true)
case .captionsFailedToSetSpokenLanguage:
displayNotification(localizationKey: .captionsChangeSpokenLanguageError,
icon: .captionsError,
isPersistent: false)
case .captionsFailedToSetCaptionLanguage:
displayNotification(localizationKey: .captionsChangeCaptionsLanguageError,
icon: .captionsError,
isPersistent: false)
case .none:
self.visible = false
return
}
}