mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Instantiate the verification controller ASAP (#3893)
* Instantiate the verification controller when possible This is needed to get incoming verification requests * Workaround test failure
This commit is contained in:
committed by
GitHub
parent
b06699e53e
commit
6bce3d513d
+11
@@ -96,6 +96,17 @@ class RustSessionVerificationService(
|
|||||||
|
|
||||||
private var listener: SessionVerificationServiceListener? = null
|
private var listener: SessionVerificationServiceListener? = null
|
||||||
|
|
||||||
|
init {
|
||||||
|
// Instantiate the verification controller when possible, this is needed to get incoming verification requests
|
||||||
|
sessionCoroutineScope.launch {
|
||||||
|
// Needed to avoid crashes on unit tests due to the Rust SDK not being available
|
||||||
|
tryOrNull {
|
||||||
|
encryptionService.waitForE2eeInitializationTasks()
|
||||||
|
initVerificationControllerIfNeeded()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun setListener(listener: SessionVerificationServiceListener?) {
|
override fun setListener(listener: SessionVerificationServiceListener?) {
|
||||||
this.listener = listener
|
this.listener = listener
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user