mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-16 12:00:03 +03:00
Remove unused context in crypto service getCryptoVersion
This commit is contained in:
parent
ccd6eed45a
commit
09c68f3421
4 changed files with 4 additions and 6 deletions
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
package org.matrix.android.sdk.api.session.crypto
|
package org.matrix.android.sdk.api.session.crypto
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import androidx.annotation.Size
|
import androidx.annotation.Size
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.paging.PagedList
|
import androidx.paging.PagedList
|
||||||
|
@ -61,7 +60,7 @@ interface CryptoService {
|
||||||
|
|
||||||
suspend fun deleteDevices(@Size(min = 1) deviceIds: List<String>, userInteractiveAuthInterceptor: UserInteractiveAuthInterceptor)
|
suspend fun deleteDevices(@Size(min = 1) deviceIds: List<String>, userInteractiveAuthInterceptor: UserInteractiveAuthInterceptor)
|
||||||
|
|
||||||
fun getCryptoVersion(context: Context, longFormat: Boolean): String
|
fun getCryptoVersion(longFormat: Boolean): String
|
||||||
|
|
||||||
fun isCryptoEnabled(): Boolean
|
fun isCryptoEnabled(): Boolean
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
package org.matrix.android.sdk.internal.crypto
|
package org.matrix.android.sdk.internal.crypto
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.map
|
import androidx.lifecycle.map
|
||||||
import androidx.paging.PagedList
|
import androidx.paging.PagedList
|
||||||
|
@ -184,7 +183,7 @@ internal class RustCryptoService @Inject constructor(
|
||||||
deleteDevices(listOf(deviceId), userInteractiveAuthInterceptor)
|
deleteDevices(listOf(deviceId), userInteractiveAuthInterceptor)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getCryptoVersion(context: Context, longFormat: Boolean): String {
|
override fun getCryptoVersion(longFormat: Boolean): String {
|
||||||
val version = org.matrix.rustcomponents.sdk.crypto.version()
|
val version = org.matrix.rustcomponents.sdk.crypto.version()
|
||||||
val gitHash = org.matrix.rustcomponents.sdk.crypto.versionInfo().gitSha
|
val gitHash = org.matrix.rustcomponents.sdk.crypto.versionInfo().gitSha
|
||||||
val vodozemac = org.matrix.rustcomponents.sdk.crypto.vodozemacVersion()
|
val vodozemac = org.matrix.rustcomponents.sdk.crypto.vodozemacVersion()
|
||||||
|
|
|
@ -265,7 +265,7 @@ class BugReporter @Inject constructor(
|
||||||
activeSessionHolder.getSafeActiveSession()?.let { session ->
|
activeSessionHolder.getSafeActiveSession()?.let { session ->
|
||||||
userId = session.myUserId
|
userId = session.myUserId
|
||||||
deviceId = session.sessionParams.deviceId
|
deviceId = session.sessionParams.deviceId
|
||||||
olmVersion = session.cryptoService().getCryptoVersion(context, true)
|
olmVersion = session.cryptoService().getCryptoVersion(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mIsCancelled) {
|
if (!mIsCancelled) {
|
||||||
|
|
|
@ -96,7 +96,7 @@ class VectorSettingsHelpAboutFragment :
|
||||||
|
|
||||||
// olm version
|
// olm version
|
||||||
findPreference<VectorPreference>(VectorPreferences.SETTINGS_CRYPTO_VERSION_PREFERENCE_KEY)!!
|
findPreference<VectorPreference>(VectorPreferences.SETTINGS_CRYPTO_VERSION_PREFERENCE_KEY)!!
|
||||||
.summary = session.cryptoService().getCryptoVersion(requireContext(), true)
|
.summary = session.cryptoService().getCryptoVersion(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
Loading…
Add table
Reference in a new issue