File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
java/im/vector/app/features/settings Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change
1
+ Hide account deactivation UI for account managed externally.
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ import im.vector.app.core.intent.getFilenameFromUri
45
45
import im.vector.app.core.platform.SimpleTextWatcher
46
46
import im.vector.app.core.preference.UserAvatarPreference
47
47
import im.vector.app.core.preference.VectorPreference
48
+ import im.vector.app.core.preference.VectorPreferenceCategory
48
49
import im.vector.app.core.preference.VectorSwitchPreference
49
50
import im.vector.app.core.utils.TextUtils
50
51
import im.vector.app.core.utils.getSizeOfFiles
@@ -110,6 +111,9 @@ class VectorSettingsGeneralFragment :
110
111
private val mExternalAccountManagementPreference by lazy {
111
112
findPreference<VectorPreference >(VectorPreferences .SETTINGS_EXTERNAL_ACCOUNT_MANAGEMENT_KEY )!!
112
113
}
114
+ private val mDeactivateAccountCategory by lazy {
115
+ findPreference<VectorPreferenceCategory >(" SETTINGS_DEACTIVATE_ACCOUNT_CATEGORY_KEY" )!!
116
+ }
113
117
114
118
// Local contacts
115
119
private val mContactSettingsCategory by lazy {
@@ -322,6 +326,8 @@ class VectorSettingsGeneralFragment :
322
326
323
327
false
324
328
}
329
+ // Account deactivation is visible only if account is not managed by an external URL.
330
+ mDeactivateAccountCategory.isVisible = homeServerCapabilities.delegatedOidcAuthEnabled.not ()
325
331
}
326
332
327
333
private suspend fun getCacheSize (): Long = withContext(Dispatchers .IO ) {
Original file line number Diff line number Diff line change 113
113
114
114
</im .vector.app.core.preference.VectorPreferenceCategory>
115
115
116
- <im .vector.app.core.preference.VectorPreferenceCategory android : title =" @string/settings_deactivate_account_section" >
116
+ <im .vector.app.core.preference.VectorPreferenceCategory
117
+ android : key =" SETTINGS_DEACTIVATE_ACCOUNT_CATEGORY_KEY"
118
+ android : title =" @string/settings_deactivate_account_section" >
117
119
118
120
<im .vector.app.core.preference.VectorPreference
119
121
android : key =" SETTINGS_DEACTIVATE_ACCOUNT_KEY"
You can’t perform that action at this time.
0 commit comments