mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Prevent click on Cross-Signing item when not in developer mode
This commit is contained in:
parent
550dcde9b8
commit
35a5d9e454
@ -305,6 +305,10 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
mCrossSigningStatePreference.isVisible = true
|
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?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
|
@ -29,6 +29,9 @@ import im.vector.app.core.platform.VectorBaseFragment
|
|||||||
import kotlinx.android.synthetic.main.fragment_generic_recycler.*
|
import kotlinx.android.synthetic.main.fragment_generic_recycler.*
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This Fragment is only used when user activates developer mode from the settings
|
||||||
|
*/
|
||||||
class CrossSigningSettingsFragment @Inject constructor(
|
class CrossSigningSettingsFragment @Inject constructor(
|
||||||
private val controller: CrossSigningSettingsController,
|
private val controller: CrossSigningSettingsController,
|
||||||
val viewModelFactory: CrossSigningSettingsViewModel.Factory
|
val viewModelFactory: CrossSigningSettingsViewModel.Factory
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
<im.vector.app.core.preference.VectorPreferenceCategory
|
<im.vector.app.core.preference.VectorPreferenceCategory
|
||||||
android:key="SETTINGS_CRYPTOGRAPHY_PREFERENCE_KEY"
|
android:key="SETTINGS_CRYPTOGRAPHY_PREFERENCE_KEY"
|
||||||
android:title="@string/settings_cryptography">
|
android:title="@string/settings_cryptography">
|
||||||
|
|
||||||
<im.vector.app.core.preference.VectorPreference
|
<im.vector.app.core.preference.VectorPreference
|
||||||
android:key="SETTINGS_ENCRYPTION_CROSS_SIGNING_PREFERENCE_KEY"
|
android:key="SETTINGS_ENCRYPTION_CROSS_SIGNING_PREFERENCE_KEY"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
|
Loading…
Reference in New Issue
Block a user