mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Code quality
This commit is contained in:
parent
ea6b0b6a43
commit
7292c4e13d
@ -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
|
||||||
|
@ -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
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user