Skip to content

Commit ada8539

Browse files
committed
Fix remove deprecated isReady() call
1 parent 688ae7d commit ada8539

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

matrix-sdk-android/src/rustCrypto/java/org/matrix/android/sdk/internal/crypto/verification/RustVerificationService.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import org.matrix.android.sdk.internal.crypto.model.rest.VERIFICATION_METHOD_QR_
3636
import org.matrix.android.sdk.internal.crypto.model.rest.VERIFICATION_METHOD_RECIPROCATE
3737
import org.matrix.android.sdk.internal.crypto.model.rest.toValue
3838
import org.matrix.android.sdk.internal.session.SessionScope
39+
import org.matrix.rustcomponents.sdk.crypto.VerificationRequestState
3940
import timber.log.Timber
4041
import javax.inject.Inject
4142

@@ -165,7 +166,7 @@ internal class RustVerificationService @Inject constructor(
165166
// If this is a SAS verification originating from a `m.key.verification.request`
166167
// event, we auto-accept here considering that we either initiated the request or
167168
// accepted the request. If it's a QR code verification, just dispatch an update.
168-
if (request.isReady() && transaction is SasVerification) {
169+
if (request.innerState() is VerificationRequestState.Ready && transaction is SasVerification) {
169170
// accept() will dispatch an update, no need to do it twice.
170171
Timber.d("## Verification: Auto accepting SAS verification with $sender")
171172
transaction.accept()
@@ -308,7 +309,7 @@ internal class RustVerificationService @Inject constructor(
308309
return if (request != null) {
309310
request.acceptWithMethods(methods)
310311
request.startQrCode()
311-
request.isReady()
312+
request.innerState() is VerificationRequestState.Ready
312313
} else {
313314
false
314315
}

matrix-sdk-android/src/rustCrypto/java/org/matrix/android/sdk/internal/crypto/verification/VerificationRequest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ internal class VerificationRequest @AssistedInject constructor(
136136
* concrete verification flow, i.e. we can show/scan a QR code or start emoji
137137
* verification.
138138
*/
139-
internal fun isReady(): Boolean {
140-
return innerVerificationRequest.isReady()
141-
}
139+
// internal fun isReady(): Boolean {
140+
// return innerVerificationRequest.isReady()
141+
// }
142142

143143
/** Did we advertise that we're able to scan QR codes */
144144
internal fun canScanQrCodes(): Boolean {

0 commit comments

Comments
 (0)