mirror of
https://github.com/element-hq/element-android
synced 2024-11-23 01:45:36 +03:00
Fix remove deprecated isReady() call
This commit is contained in:
parent
688ae7d259
commit
ada8539898
2 changed files with 6 additions and 5 deletions
|
@ -36,6 +36,7 @@ import org.matrix.android.sdk.internal.crypto.model.rest.VERIFICATION_METHOD_QR_
|
|||
import org.matrix.android.sdk.internal.crypto.model.rest.VERIFICATION_METHOD_RECIPROCATE
|
||||
import org.matrix.android.sdk.internal.crypto.model.rest.toValue
|
||||
import org.matrix.android.sdk.internal.session.SessionScope
|
||||
import org.matrix.rustcomponents.sdk.crypto.VerificationRequestState
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -165,7 +166,7 @@ internal class RustVerificationService @Inject constructor(
|
|||
// If this is a SAS verification originating from a `m.key.verification.request`
|
||||
// event, we auto-accept here considering that we either initiated the request or
|
||||
// accepted the request. If it's a QR code verification, just dispatch an update.
|
||||
if (request.isReady() && transaction is SasVerification) {
|
||||
if (request.innerState() is VerificationRequestState.Ready && transaction is SasVerification) {
|
||||
// accept() will dispatch an update, no need to do it twice.
|
||||
Timber.d("## Verification: Auto accepting SAS verification with $sender")
|
||||
transaction.accept()
|
||||
|
@ -308,7 +309,7 @@ internal class RustVerificationService @Inject constructor(
|
|||
return if (request != null) {
|
||||
request.acceptWithMethods(methods)
|
||||
request.startQrCode()
|
||||
request.isReady()
|
||||
request.innerState() is VerificationRequestState.Ready
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
|
|
@ -136,9 +136,9 @@ internal class VerificationRequest @AssistedInject constructor(
|
|||
* concrete verification flow, i.e. we can show/scan a QR code or start emoji
|
||||
* verification.
|
||||
*/
|
||||
internal fun isReady(): Boolean {
|
||||
return innerVerificationRequest.isReady()
|
||||
}
|
||||
// internal fun isReady(): Boolean {
|
||||
// return innerVerificationRequest.isReady()
|
||||
// }
|
||||
|
||||
/** Did we advertise that we're able to scan QR codes */
|
||||
internal fun canScanQrCodes(): Boolean {
|
||||
|
|
Loading…
Reference in a new issue