Skip to content

Commit

Permalink
Fix remove deprecated isReady() call
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Jun 1, 2023
1 parent c4fa53d commit e417624
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e417624

Please sign in to comment.