Code quality

This commit is contained in:
Benoit Marty 2021-06-30 13:57:42 +02:00
parent ea6b0b6a43
commit 7292c4e13d
2 changed files with 18 additions and 3 deletions

View File

@ -18,7 +18,6 @@ package org.matrix.android.sdk.internal.wellknown
import android.util.MalformedJsonException import android.util.MalformedJsonException
import dagger.Lazy import dagger.Lazy
import org.matrix.android.sdk.api.MatrixPatterns
import org.matrix.android.sdk.api.auth.data.HomeServerConnectionConfig import org.matrix.android.sdk.api.auth.data.HomeServerConnectionConfig
import org.matrix.android.sdk.api.auth.data.WellKnown import org.matrix.android.sdk.api.auth.data.WellKnown
import org.matrix.android.sdk.api.auth.wellknown.WellknownResult import org.matrix.android.sdk.api.auth.wellknown.WellknownResult

View File

@ -50,7 +50,15 @@ class UnrecognizedCertificateDialog @Inject constructor(
val userId = activeSessionHolder.getSafeActiveSession()?.myUserId val userId = activeSessionHolder.getSafeActiveSession()?.myUserId
val hsConfig = activeSessionHolder.getSafeActiveSession()?.sessionParams?.homeServerConnectionConfig ?: return val hsConfig = activeSessionHolder.getSafeActiveSession()?.sessionParams?.homeServerConnectionConfig ?: return
internalShow(activity, unrecognizedFingerprint, true, callback, userId, hsConfig.homeServerUriBase.toString(), hsConfig.allowedFingerprints.isNotEmpty()) internalShow(
activity = activity,
unrecognizedFingerprint = unrecognizedFingerprint,
existing = true,
callback = callback,
userId = userId,
homeServerUrl = hsConfig.homeServerUriBase.toString(),
homeServerConnectionConfigHasFingerprints = hsConfig.allowedFingerprints.isNotEmpty()
)
} }
/** /**
@ -60,7 +68,15 @@ class UnrecognizedCertificateDialog @Inject constructor(
unrecognizedFingerprint: Fingerprint, unrecognizedFingerprint: Fingerprint,
homeServerUrl: String, homeServerUrl: String,
callback: Callback) { callback: Callback) {
internalShow(activity, unrecognizedFingerprint, false, callback, null, homeServerUrl, false) internalShow(
activity = activity,
unrecognizedFingerprint = unrecognizedFingerprint,
existing = false,
callback = callback,
userId = null,
homeServerUrl = homeServerUrl,
homeServerConnectionConfigHasFingerprints = false
)
} }
/** /**