Skip to content

Commit

Permalink
Merge pull request #4379 from vector-im/feature/adm/sso-ordering
Browse files Browse the repository at this point in the history
Sorting social providers by priority
  • Loading branch information
bmarty authored Nov 2, 2021
2 parents b450102 + c261340 commit 26f8f5d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/4277.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updating single sign on providers ordering to match priority/popularity
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class LoginFragment @Inject constructor() : AbstractSSOLoginFragment<FragmentLog

if (state.loginMode is LoginMode.SsoAndPassword) {
views.loginSocialLoginContainer.isVisible = true
views.loginSocialLoginButtons.ssoIdentityProviders = state.loginMode.ssoIdentityProviders
views.loginSocialLoginButtons.ssoIdentityProviders = state.loginMode.ssoIdentityProviders?.sorted()
views.loginSocialLoginButtons.listener = object : SocialLoginButtonsView.InteractionListener {
override fun onProviderSelected(id: String?) {
loginViewModel.getSsoUrl(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class LoginSignUpSignInSelectionFragment @Inject constructor() : AbstractSSOLogi
when (state.loginMode) {
is LoginMode.SsoAndPassword -> {
views.loginSignupSigninSignInSocialLoginContainer.isVisible = true
views.loginSignupSigninSocialLoginButtons.ssoIdentityProviders = state.loginMode.ssoIdentityProviders()
views.loginSignupSigninSocialLoginButtons.ssoIdentityProviders = state.loginMode.ssoIdentityProviders()?.sorted()
views.loginSignupSigninSocialLoginButtons.listener = object : SocialLoginButtonsView.InteractionListener {
override fun onProviderSelected(id: String?) {
loginViewModel.getSsoUrl(
Expand Down

0 comments on commit 26f8f5d

Please sign in to comment.