Fixes #3137 - Delay starting ElementCall until a sync response comes in (or a 5 second timeout)

- this will ensure that the room state is up to date before sending any call related events
This commit is contained in:
Stefan Ceriu
2024-08-08 14:11:33 +03:00
committed by Stefan Ceriu
parent 0b984cc3eb
commit 0ad8f3cae8
2 changed files with 48 additions and 31 deletions
@@ -22,12 +22,16 @@ struct CallScreen: View {
@ObservedObject var context: CallScreenViewModel.Context
var body: some View {
WebView(url: context.viewState.url, viewModelContext: context)
// This URL is stable, forces view reloads if this representable is ever reused for another url
.id(context.viewState.url)
.ignoresSafeArea(edges: .bottom)
.presentationDragIndicator(.visible)
.alert(item: $context.alertInfo)
if context.viewState.url == nil {
ProgressView()
} else {
WebView(url: context.viewState.url, viewModelContext: context)
// This URL is stable, forces view reloads if this representable is ever reused for another url
.id(context.viewState.url)
.ignoresSafeArea(edges: .bottom)
.presentationDragIndicator(.visible)
.alert(item: $context.alertInfo)
}
}
}