Merge pull request #8645 from vector-im/hughns/oidc-device-logout-in-chrome-tab

Open OIDC account management URL in chrome tab
This commit is contained in:
Benoit Marty 2023-09-14 21:54:23 +02:00 committed by GitHub
commit 1b3be240b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/8645.misc Normal file
View File

@ -0,0 +1 @@
Open external account manager for delete other sessions using Chrome custom tabs.

View File

@ -49,7 +49,7 @@ import im.vector.app.core.preference.VectorPreferenceCategory
import im.vector.app.core.preference.VectorSwitchPreference
import im.vector.app.core.utils.TextUtils
import im.vector.app.core.utils.getSizeOfFiles
import im.vector.app.core.utils.openUrlInExternalBrowser
import im.vector.app.core.utils.openUrlInChromeCustomTab
import im.vector.app.core.utils.toast
import im.vector.app.databinding.DialogChangePasswordBinding
import im.vector.app.features.MainActivity
@ -225,7 +225,7 @@ class VectorSettingsGeneralFragment :
// Hide the preference if no URL is given by server
if (homeServerCapabilities.externalAccountManagementUrl != null) {
mExternalAccountManagementPreference.onPreferenceClickListener = Preference.OnPreferenceClickListener {
openUrlInExternalBrowser(it.context, homeServerCapabilities.externalAccountManagementUrl)
openUrlInChromeCustomTab(it.context, null, homeServerCapabilities.externalAccountManagementUrl!!)
true
}