mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Expose rust version in settings and RS
This commit is contained in:
parent
46a49d899c
commit
3705e14851
@ -44,6 +44,7 @@
|
||||
<w>unpublish</w>
|
||||
<w>unwedging</w>
|
||||
<w>vctr</w>
|
||||
<w>vodozemac</w>
|
||||
<w>wellknown</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
|
@ -1002,7 +1002,9 @@
|
||||
</plurals>
|
||||
|
||||
<string name="settings_version">Version</string>
|
||||
<string name="settings_olm_version">olm version</string>
|
||||
<!-- TODO TO BE REMOVED -->
|
||||
<string tools:ignore="UnusedResources" name="settings_olm_version">olm version</string>
|
||||
<string name="settings_crypto_version">Crypto version</string>
|
||||
<string name="settings_app_term_conditions">Terms & conditions</string>
|
||||
<string name="settings_acceptable_use_policy">Acceptable Use Policy</string>
|
||||
<string name="settings_third_party_notices">Third party notices</string>
|
||||
|
@ -184,8 +184,9 @@ internal class RustCryptoService @Inject constructor(
|
||||
}
|
||||
|
||||
override fun getCryptoVersion(context: Context, longFormat: Boolean): String {
|
||||
// TODO we should provide olm and rust-sdk version from the rust-sdk
|
||||
return if (longFormat) "Rust SDK 0.3" else "0.3"
|
||||
val version = org.matrix.rustcomponents.sdk.crypto.version()
|
||||
val vodozemac = org.matrix.rustcomponents.sdk.crypto.vodozemacVersion()
|
||||
return if (longFormat) "Rust SDK $version, Vodozemac $vodozemac" else version
|
||||
}
|
||||
|
||||
override fun getMyCryptoDevice(): CryptoDeviceInfo {
|
||||
|
@ -52,7 +52,7 @@ class VectorPreferences @Inject constructor(
|
||||
const val SETTINGS_CHANGE_PASSWORD_PREFERENCE_KEY = "SETTINGS_CHANGE_PASSWORD_PREFERENCE_KEY"
|
||||
const val SETTINGS_VERSION_PREFERENCE_KEY = "SETTINGS_VERSION_PREFERENCE_KEY"
|
||||
const val SETTINGS_SDK_VERSION_PREFERENCE_KEY = "SETTINGS_SDK_VERSION_PREFERENCE_KEY"
|
||||
const val SETTINGS_OLM_VERSION_PREFERENCE_KEY = "SETTINGS_OLM_VERSION_PREFERENCE_KEY"
|
||||
const val SETTINGS_CRYPTO_VERSION_PREFERENCE_KEY = "SETTINGS_CRYPTO_VERSION_PREFERENCE_KEY"
|
||||
const val SETTINGS_LOGGED_IN_PREFERENCE_KEY = "SETTINGS_LOGGED_IN_PREFERENCE_KEY"
|
||||
const val SETTINGS_HOME_SERVER_PREFERENCE_KEY = "SETTINGS_HOME_SERVER_PREFERENCE_KEY"
|
||||
const val SETTINGS_IDENTITY_SERVER_PREFERENCE_KEY = "SETTINGS_IDENTITY_SERVER_PREFERENCE_KEY"
|
||||
|
@ -95,8 +95,8 @@ class VectorSettingsHelpAboutFragment :
|
||||
}
|
||||
|
||||
// olm version
|
||||
findPreference<VectorPreference>(VectorPreferences.SETTINGS_OLM_VERSION_PREFERENCE_KEY)!!
|
||||
.summary = session.cryptoService().getCryptoVersion(requireContext(), false)
|
||||
findPreference<VectorPreference>(VectorPreferences.SETTINGS_CRYPTO_VERSION_PREFERENCE_KEY)!!
|
||||
.summary = session.cryptoService().getCryptoVersion(requireContext(), true)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
@ -24,8 +24,8 @@
|
||||
tools:summary="4.5.6" />
|
||||
|
||||
<im.vector.app.core.preference.VectorPreference
|
||||
android:key="SETTINGS_OLM_VERSION_PREFERENCE_KEY"
|
||||
android:title="@string/settings_olm_version"
|
||||
android:key="SETTINGS_CRYPTO_VERSION_PREFERENCE_KEY"
|
||||
android:title="@string/settings_crypto_version"
|
||||
tools:summary="7.8.9" />
|
||||
|
||||
</im.vector.app.core.preference.VectorPreferenceCategory>
|
||||
@ -39,4 +39,4 @@
|
||||
|
||||
</im.vector.app.core.preference.VectorPreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
Loading…
Reference in New Issue
Block a user