mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 20:06:51 +03:00
Fix crash when opening Identity Server detail from preference
This commit is contained in:
parent
bcf6342312
commit
0a0dd4ee1b
2 changed files with 6 additions and 3 deletions
|
@ -176,8 +176,7 @@ class VectorSettingsGeneralFragment @Inject constructor(
|
||||||
mPasswordPreference.isVisible = false
|
mPasswordPreference.isVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
val discoveryPreference = findPreference<VectorPreference>(VectorPreferences.SETTINGS_DISCOVERY_PREFERENCE_KEY)!!
|
val openDiscoveryScreenPreferenceClickListener = Preference.OnPreferenceClickListener {
|
||||||
discoveryPreference.onPreferenceClickListener = Preference.OnPreferenceClickListener {
|
|
||||||
(requireActivity() as VectorSettingsActivity).navigateTo(
|
(requireActivity() as VectorSettingsActivity).navigateTo(
|
||||||
DiscoverySettingsFragment::class.java,
|
DiscoverySettingsFragment::class.java,
|
||||||
SettingsActivityPayload.DiscoverySettings().toMvRxBundle()
|
SettingsActivityPayload.DiscoverySettings().toMvRxBundle()
|
||||||
|
@ -185,6 +184,11 @@ class VectorSettingsGeneralFragment @Inject constructor(
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val discoveryPreference = findPreference<VectorPreference>(VectorPreferences.SETTINGS_DISCOVERY_PREFERENCE_KEY)!!
|
||||||
|
discoveryPreference.onPreferenceClickListener = openDiscoveryScreenPreferenceClickListener
|
||||||
|
|
||||||
|
mIdentityServerPreference.onPreferenceClickListener = openDiscoveryScreenPreferenceClickListener
|
||||||
|
|
||||||
// Advanced settings
|
// Advanced settings
|
||||||
|
|
||||||
// user account
|
// user account
|
||||||
|
|
|
@ -87,7 +87,6 @@
|
||||||
<im.vector.app.core.preference.VectorPreference
|
<im.vector.app.core.preference.VectorPreference
|
||||||
android:key="SETTINGS_IDENTITY_SERVER_PREFERENCE_KEY"
|
android:key="SETTINGS_IDENTITY_SERVER_PREFERENCE_KEY"
|
||||||
android:title="@string/settings_identity_server"
|
android:title="@string/settings_identity_server"
|
||||||
app:fragment="im.vector.app.features.discovery.DiscoverySettingsFragment"
|
|
||||||
tools:summary="https://identity.server.url" />
|
tools:summary="https://identity.server.url" />
|
||||||
|
|
||||||
<im.vector.app.core.preference.VectorPreference
|
<im.vector.app.core.preference.VectorPreference
|
||||||
|
|
Loading…
Reference in a new issue