Fix crash when opening Identity Server detail from preference
This commit is contained in:
parent
bcf6342312
commit
0a0dd4ee1b
|
@ -176,8 +176,7 @@ class VectorSettingsGeneralFragment @Inject constructor(
|
|||
mPasswordPreference.isVisible = false
|
||||
}
|
||||
|
||||
val discoveryPreference = findPreference<VectorPreference>(VectorPreferences.SETTINGS_DISCOVERY_PREFERENCE_KEY)!!
|
||||
discoveryPreference.onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||
val openDiscoveryScreenPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||
(requireActivity() as VectorSettingsActivity).navigateTo(
|
||||
DiscoverySettingsFragment::class.java,
|
||||
SettingsActivityPayload.DiscoverySettings().toMvRxBundle()
|
||||
|
@ -185,6 +184,11 @@ class VectorSettingsGeneralFragment @Inject constructor(
|
|||
true
|
||||
}
|
||||
|
||||
val discoveryPreference = findPreference<VectorPreference>(VectorPreferences.SETTINGS_DISCOVERY_PREFERENCE_KEY)!!
|
||||
discoveryPreference.onPreferenceClickListener = openDiscoveryScreenPreferenceClickListener
|
||||
|
||||
mIdentityServerPreference.onPreferenceClickListener = openDiscoveryScreenPreferenceClickListener
|
||||
|
||||
// Advanced settings
|
||||
|
||||
// user account
|
||||
|
|
|
@ -87,7 +87,6 @@
|
|||
<im.vector.app.core.preference.VectorPreference
|
||||
android:key="SETTINGS_IDENTITY_SERVER_PREFERENCE_KEY"
|
||||
android:title="@string/settings_identity_server"
|
||||
app:fragment="im.vector.app.features.discovery.DiscoverySettingsFragment"
|
||||
tools:summary="https://identity.server.url" />
|
||||
|
||||
<im.vector.app.core.preference.VectorPreference
|
||||
|
|
Loading…
Reference in New Issue