mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-03 12:37:31 +01:00
unused flow
This commit is contained in:
parent
1b12db9270
commit
4ecbf87cda
@ -28,6 +28,7 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.cancel
|
||||
import kotlinx.coroutines.flow.cancellable
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
@ -76,9 +77,8 @@ class KeyRequestHandler @Inject constructor(
|
||||
// lateinit var listenerJob: Job
|
||||
fun start(session: Session) {
|
||||
this.session = session
|
||||
scope = CoroutineScope(SupervisorJob() + session.coroutineScope.coroutineContext)
|
||||
// session.cryptoService().verificationService().addListener(this)
|
||||
scope!!.launch {
|
||||
val scope = CoroutineScope(SupervisorJob() + session.coroutineScope.coroutineContext)
|
||||
this.scope = scope
|
||||
session.cryptoService().verificationService().requestEventFlow()
|
||||
.cancellable()
|
||||
.onEach {
|
||||
@ -88,8 +88,7 @@ class KeyRequestHandler @Inject constructor(
|
||||
is VerificationEvent.TransactionAdded -> transactionCreated(it.transaction)
|
||||
is VerificationEvent.TransactionUpdated -> transactionUpdated(it.transaction)
|
||||
}
|
||||
}
|
||||
}
|
||||
}.launchIn(scope)
|
||||
|
||||
session.cryptoService().addRoomKeysRequestListener(this)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user