Prevent click on Cross-Signing item when not in developer mode

This commit is contained in:
Benoit Marty 2020-08-17 10:59:45 +02:00 committed by Benoit Marty
parent 550dcde9b8
commit 35a5d9e454
3 changed files with 8 additions and 0 deletions

View File

@ -305,6 +305,10 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
}
mCrossSigningStatePreference.isVisible = true
if (!vectorPreferences.developerMode()) {
// When not in developer mode, intercept click on this preference
mCrossSigningStatePreference.onPreferenceClickListener = Preference.OnPreferenceClickListener { true }
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {

View File

@ -29,6 +29,9 @@ import im.vector.app.core.platform.VectorBaseFragment
import kotlinx.android.synthetic.main.fragment_generic_recycler.*
import javax.inject.Inject
/**
* This Fragment is only used when user activates developer mode from the settings
*/
class CrossSigningSettingsFragment @Inject constructor(
private val controller: CrossSigningSettingsController,
val viewModelFactory: CrossSigningSettingsViewModel.Factory

View File

@ -17,6 +17,7 @@
<im.vector.app.core.preference.VectorPreferenceCategory
android:key="SETTINGS_CRYPTOGRAPHY_PREFERENCE_KEY"
android:title="@string/settings_cryptography">
<im.vector.app.core.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_CROSS_SIGNING_PREFERENCE_KEY"
android:persistent="false"