Merge pull request #6114 from element-hq/feature/bma/elementCallKnownHost
Ensure that Element Call activity is not closed when using an external link
This commit is contained in:
commit
e34b15823e
2 changed files with 11 additions and 7 deletions
|
|
@ -149,15 +149,18 @@ class CallScreenPresenter(
|
||||||
.launchIn(this)
|
.launchIn(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
LaunchedEffect(Unit) {
|
if (callType is CallType.RoomCall) {
|
||||||
// Wait for the call to be joined, if it takes too long, we display an error
|
// Note: For external calls isWidgetLoaded will always be false
|
||||||
delay(10.seconds)
|
LaunchedEffect(Unit) {
|
||||||
|
// Wait for the call to be joined, if it takes too long, we display an error
|
||||||
|
delay(10.seconds)
|
||||||
|
|
||||||
if (!isWidgetLoaded) {
|
if (!isWidgetLoaded) {
|
||||||
Timber.w("The call took too long to load. Displaying an error before exiting.")
|
Timber.w("The call took too long to load. Displaying an error before exiting.")
|
||||||
|
|
||||||
// This will display a simple 'Sorry, an error occurred' dialog and force the user to exit the call
|
// This will display a simple 'Sorry, an error occurred' dialog and force the user to exit the call
|
||||||
webViewError = ""
|
webViewError = ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ class CallIntentDataParser {
|
||||||
private val validHttpSchemes = sequenceOf("https")
|
private val validHttpSchemes = sequenceOf("https")
|
||||||
private val knownHosts = sequenceOf(
|
private val knownHosts = sequenceOf(
|
||||||
"call.element.io",
|
"call.element.io",
|
||||||
|
"call.pro.element.io",
|
||||||
)
|
)
|
||||||
|
|
||||||
fun parse(data: String?): String? {
|
fun parse(data: String?): String? {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue