[Calling][Bug] Network error in the setup screen (#420)

This commit is contained in:
ShaunaSong 2022-09-09 13:06:58 -07:00 коммит произвёл Mohtasim
Родитель 2708933094
Коммит 6aa3ca3ff4
1 изменённых файлов: 10 добавлений и 8 удалений

Просмотреть файл

@ -32,24 +32,26 @@ internal class ErrorInfoView(private val rootView: View) {
initSnackBar()
viewLifecycleOwner.lifecycleScope.launch {
snackBarViewModel.getCallStateErrorStateFlow().collect {
if (it == null) {
if (it == null && snackBarViewModel.callCompositeErrorFlow.value == null) {
snackBar.dismiss()
} else {
displaySnackBar(it, "")
it?.let { displaySnackBar(it, "") }
}
}
}
viewLifecycleOwner.lifecycleScope.launch {
snackBarViewModel.callCompositeErrorFlow.collect {
if (it == null) {
if (it == null && snackBarViewModel.getCallStateErrorStateFlow().value == null) {
snackBar.dismiss()
} else {
displaySnackBar(
null,
rootView.context.getText(R.string.azure_communication_ui_calling_call_video_fails_error)
.toString()
)
it?.let {
displaySnackBar(
null,
rootView.context.getText(R.string.azure_communication_ui_calling_call_video_fails_error)
.toString()
)
}
}
}
}