mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Fix remove deprecated isReady() call
This commit is contained in:
parent
688ae7d259
commit
ada8539898
@ -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.VERIFICATION_METHOD_RECIPROCATE
|
||||||
import org.matrix.android.sdk.internal.crypto.model.rest.toValue
|
import org.matrix.android.sdk.internal.crypto.model.rest.toValue
|
||||||
import org.matrix.android.sdk.internal.session.SessionScope
|
import org.matrix.android.sdk.internal.session.SessionScope
|
||||||
|
import org.matrix.rustcomponents.sdk.crypto.VerificationRequestState
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import javax.inject.Inject
|
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`
|
// 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
|
// 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.
|
// 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.
|
// accept() will dispatch an update, no need to do it twice.
|
||||||
Timber.d("## Verification: Auto accepting SAS verification with $sender")
|
Timber.d("## Verification: Auto accepting SAS verification with $sender")
|
||||||
transaction.accept()
|
transaction.accept()
|
||||||
@ -308,7 +309,7 @@ internal class RustVerificationService @Inject constructor(
|
|||||||
return if (request != null) {
|
return if (request != null) {
|
||||||
request.acceptWithMethods(methods)
|
request.acceptWithMethods(methods)
|
||||||
request.startQrCode()
|
request.startQrCode()
|
||||||
request.isReady()
|
request.innerState() is VerificationRequestState.Ready
|
||||||
} else {
|
} else {
|
||||||
false
|
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
|
* concrete verification flow, i.e. we can show/scan a QR code or start emoji
|
||||||
* verification.
|
* verification.
|
||||||
*/
|
*/
|
||||||
internal fun isReady(): Boolean {
|
// internal fun isReady(): Boolean {
|
||||||
return innerVerificationRequest.isReady()
|
// return innerVerificationRequest.isReady()
|
||||||
}
|
// }
|
||||||
|
|
||||||
/** Did we advertise that we're able to scan QR codes */
|
/** Did we advertise that we're able to scan QR codes */
|
||||||
internal fun canScanQrCodes(): Boolean {
|
internal fun canScanQrCodes(): Boolean {
|
||||||
|
Loading…
Reference in New Issue
Block a user